Skip to content

Commit

Permalink
Merge pull request #51 from cawaltrip/master
Browse files Browse the repository at this point in the history
Pull now or forever hold your peace
  • Loading branch information
cawaltrip committed Dec 20, 2013
2 parents a2bf95b + 5427b0a commit 0cea095
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions fitg/ai/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def run(self):
# ASSASSINATION: A
# STOP REBELLION: R
# GAIN CHARACTERS: G

# Start game loop
environ_list = c.get_state(gameid, "Environ")# = all environs in this scenario
# when it's our turn
while(True):
Expand Down
Binary file modified fitg/client/Data/blue_planet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fitg/client/Data/purple_planet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions fitg/client/entities/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def updatepoints(self):
angle = self.startangle
while angle < self.endangle:
angle = angle + UNITANGLE / 2
self.collision_points.append((int(self.center[0] + (cos(angle) * self. averadius)), int(self.center[1] - (sin(angle) * self. averadius))))
self.collision_points.append((int(self.center[0] + (cos(angle) * self. averadius)),
int(self.center[1] - (sin(angle) * self. averadius))))
angle = angle + UNITANGLE / 2
self.stacks = len(self.collision_points)

Expand Down Expand Up @@ -98,7 +99,8 @@ def __init__(self, parent, planetrect):
self.refresh = True
self.planet = planetrect
self.environ_list = []
self.envarc = pygame.Rect(planetrect.topleft[0] - 75, planetrect.topleft[1] - 75, planetrect.width + 150, planetrect.height + 150)
self.envarc = pygame.Rect(planetrect.topleft[0] - 75, planetrect.topleft[1] - 75,
planetrect.width + 150, planetrect.height + 150)

#def addEnviron(self, idnumber, type, size, race, creature, politics):
def addEnviron(self, environdict):
Expand Down
12 changes: 6 additions & 6 deletions fitg/client/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
import hud.buttons as Menu_Buttons

from support.loadimage import load_image
import menubar
from menubar import (MenuBar, planetFontSurface, planet1name,
import hud.planetbar as menubar
from hud.planetbar import (MenuBar, planetFontSurface, planet1name,
planet2name, planet3name, planet4name,
planet5name, planettextcolor, PlanetName,
backgroundcolor)
from menubar import menubar as menubar_
from hud.planetbar import menubar as menubar_

pygame.init()

def main(client, setupinfo=None):
gameid = 'test1'#setupinfo["request"]["parameters"]["id"]
height = 720
width = 1024
height = 800
width = 1550
screensize = (width, height)
screen = pygame.display.set_mode(screensize)
clock = pygame.time.Clock()
Expand All @@ -35,7 +35,7 @@ def main(client, setupinfo=None):
running = True

background, background_rect = load_image("stars.jpg")
outer_menu = MenuBar(planet1name, 1, backgroundcolor, True, (90,0))
outer_menu = MenuBar(planet1name, 1, backgroundcolor, True, (700,0))
menubar.pdb_image, menubar.pdbrect = load_image("pdbup.png", None)
menubar.pdbrect.topleft = menubar.pdbboxpostion
screen.blit(background, background_rect)
Expand Down
2 changes: 1 addition & 1 deletion fitg/client/menubar.py → fitg/client/hud/planetbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def load_image(image, colorkey=None):
lightbluecolor = (100,149,237)

#Marks the position of the Menu Bar relative to the master background screen
MenuBarUpperLeftCorner = (200,0) # For test purposes. The final product will pass these coordinates into the initialization
MenuBarUpperLeftCorner = (450,0) # For test purposes. The final product will pass these coordinates into the initialization
x = MenuBarUpperLeftCorner[0] # take out
y = MenuBarUpperLeftCorner[1] #take out

Expand Down

0 comments on commit 0cea095

Please sign in to comment.