Giter Site home page Giter Site logo

davidjpfeiffer / game-engine Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 638 KB

A two-player turn-based strategy game engine

License: GNU General Public License v3.0

C++ 98.83% C 1.09% Batchfile 0.08%
game-engine game-development algorithm player humans strategy-game

game-engine's People

Contributors

davidjpfeiffer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

game-engine's Issues

Make board value enum a class

This class should have two properties:

  • enum for value (x, o, or empty)
  • enum for player (one or two)

It should also have certain methods, like a method to get the board value as a char.

Add Trust game

The game has many names, but the general idea is that players develop algorithms to try and optimize their own personal reward. Both players win if they both trust each other. If only one player lies then that player gets an even bigger reward, at the expense of the other player. If both players lie then both players loose.

This website has built a fully functioning version of the game, but if it is added to the game engine new algorithms can be built to play against each other in tournaments.

Refactor utilities to Game class

Refactor all game specific login into a game class that is used in all other classes. The utilities file should only contain helper methods that know nothing about the game object.

Extract interfaces for game related classes

We should extract an interface (abstract class in c++) from all game related classes and have the game engine use these interfaces instead of a classes related to a specific game.

This will make the game engine reusable for other two player board games.

Create GUI for game engine

The project should have a GUI that allows the user to select a game, two players, and the number of games to be played (n). The game engine should then play the game n times and display the output on the screen by either drawing the board or displaying the multiple games summary statistics.

Add Chess Game

Chess should be added as a Game in addition to Connect Four and Tic Tac Toe. Because this game is much more advanced it will show the true strength of the Game Engine. We might also add optimizations to the game engine to handle the stress for this game.

Change Game Definition

On Game Definition class:

SetGameDefinition method should be changed to GetGameDefinition to avoid pointer confusion.

Better abstractions

We should improve abstractions within the game engine to take more abstract objects when possible.

For example, the isValidMove method should take a Player, not a PlayerValue.

Board should be a class not a typedef

The board is currently a typedef of a vector of type vector of type board value. The board should instead be refactored into a separate class with utility methods that interact with the board array.

Rename project to game engine

This project should not be specific to a single game but should work for any two-player turn-based strategy board game.

After the project it renamed a second game should be added in addition to Tic Tac Toe.

Additional starting options and parameters

The program should accept the starting options as command line parameters. If none are provided, the program should prompt the user for the options as it currently does.

We should time the execution of the games and include this information in the game statistics.

The program should have an additional starting option, which lets the user enter explicitly state whether or not they would like the games to be printed. If this parameter is set to true then the number of games parameter is optional and defaults to one. The default value of this parameter is to display statistics. When we display statistics we do not include player stats for one game, but we always show the average execution time per game.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.