this project is a part of the OOP (261200) course in Chiang Mai University. It about a turn base game like Civilization, but it's not the same.
- First of all player need to make first construction plan that will be the first plan to win the game.
- During the game player can change your construction plan by using the command that satisfy the grammar and parser of this game.
- The game will be end when the player win the game or lose the game. (there is only one player left in the game)
- Plan → Statement+
- Statement → Command | BlockStatement | IfStatement | WhileStatement
- Command → AssignmentStatement | ActionCommand
- AssignmentStatement → = Expression
- ActionCommand → done | relocate | MoveCommand | RegionCommand | AttackCommand
- MoveCommand → move Direction
- RegionCommand → invest Expression | collect Expression
- AttackCommand → shoot Direction Expression
- Direction → up | down | upleft | upright | downleft | downright
- BlockStatement → { Statement* }
- IfStatement → if ( Expression ) then Statement else Statement
- WhileStatement → while ( Expression ) Statement
- Expression → Expression + Term | Expression - Term | Term
- Term → Term * Factor | Term / Factor | Term % Factor | Factor
- Factor → Power ^ Factor | Power
- Power → | | ( Expression ) | InfoExpression
- InfoExpression → opponent | nearby Direction