LaraMo / Risk-Swift-Sloths

COMP 345 project taken in Fall 2023 - creating the RISK game with C++
Apache License 2.0
0 stars 2 forks source link

Game Engines #5

Closed LaraMo closed 1 year ago

LaraMo commented 1 year ago

Implement a group of C++ classes that implements a game engine that controls the flow of the game by using the notion of state, transition, and command. The state represents a certain phase of the game and dictates what are the valid actions or user commands that take place in this phase. Some actions or commands may eventually trigger a transition to another state, which is what controls the flow of the game. All the classes/functions that you implement for this component must all reside in a single .cpp/.h file duo named GameEngine.cpp/GameEngine.h. You must deliver a file named GameEngineDriver.cpp file that contains a free function named testGameStates() that allows the user to type command strings on the console, whose result is to trigger some state transitions as depicted in the state transition diagram presented below. Any command string entered that does not correspond to an outgoing edge of the current state should be rejected.