Skip to content

akelmas/Coz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPPND: Capstone

I decided to make a game called Coz for the Capstone Project. This game is played with 2 players. In addition to traditional game, 2 more difficulty level added as a feature. Players will make moves using mouse and keyboard inputs.

Project structure

  • Classes and source files
    • Coz - That is the top level class, processes game logic, input handlers, and graphics
    • Gamelogic - This class includes necessary methods to perform error checks, validate player moves, keep state of the game
    • Graphics - This class has methods and variables to provide graphical interface for the game. For each state of the game it has different methods to draw related view to the screen.
    • Controller - This class is responsible for handling user inputs. The game is mainly based on mouse input but it has definitions for some keystrokes. For example, when 'ESC' is pressed it triggers changing view to main using Coz::setMenu(Coz::MENU)
    • Definitions - this is a single header file that contains project wide constant definitions
    • Main - in main, all the instances are initialized and their references are passed to the instance method Coz::run(...) to start game. After run method returns the game window is destroyed and allocated memory for all other class intances are released.

Project vs rubric

  1. README (All Rubric Points REQUIRED)
  2. Compiling and Testing (All Rubric Points REQUIRED) - Tested build instructions on Ubuntu 20.0 and OS X Catalina
  3. Loops, Functions, I/O
  1. Object Oriented Programming
  • The project uses Object Oriented Programming techniques. - Depending on the purpose, number of classes are created as stated above in the project structure section.
  • Classes use appropriate access specifiers for class members. - considering GameLogic class, starting from line 16 public members such as getters/setters and behavioral methods are declared. private members that keeps states and data are declared after line 63
  • Class constructors utilize member initialization lists.
  1. Memory Management

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: `./Coz.

Screenshot

Releases

No releases published

Packages

No packages published