Changeset 454


Ignore:
Timestamp:
04/13/12 19:06:47 (3 years ago)
Author:
jelinson
Message:

fixed bug in heuristic and prioritizing events

Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • resources/data/analysis/state/win.heur

    r441 r454  
    3636(S'spaceship'
    3737p17
    38 I2
     38I1
    3939tp18
    4040asS'priority'
  • src/gameData.py

    r451 r454  
    4141            for building in block:
    4242                buildSceneText += building.name
    43         if buildSceneText != "":
    44             self.enqueueScene("build", buildSceneText)
    4543        self.currentState.endTurn()
    4644        self.oldState = copy.deepcopy(self.currentState)
     
    5048        if event is not None:
    5149            self.handleEvent(event)
     50           
     51        if buildSceneText != "":
     52            self.enqueueScene("build", buildSceneText)
    5253
    5354    def handleEvent(self, event):
     
    5657            if not self.oldState.deleteFirstBuilding(building):
    5758                print "Error in event: tried to delete %s, which wasn't present" % building
    58         self.enqueueScene((event.sceneName, ""))
     59        self.enqueueScene(event.sceneName, "")
    5960
    6061    def getMoney(self):
  • src/scene.py

    r451 r454  
    154154    """
    155155    try:
     156        print "Loading scene: %s" % fileName
    156157        sceneData = open(sceneDir + fileName + ".txt")
    157158    except IOError:
Note: See TracChangeset for help on using the changeset viewer.