Coder Social home page Coder Social logo

checkers's Introduction

Checkers

Beginner C++ console checkers game

##Description This application allows two players to player checkers against eacher other. The project is meant for novice programmers as this is my first project on github. Any criticism is appreciated! Up to and including advising me to quit pursing porgramming.

##Planned Features AI: I plan to implement a variation of the MiniMax algorithm for the AI.

##Project Files:

Checkers.cpp:
    Defines the entry point for the application.
    Functions:
        ValidInput() - String parsing and input checking for the main menu.
        main() - Application entry point, main menu, and game loop
        
Game.cpp:
    Handles all game functions except for the main menu.
    Functions: 
        CheckWinner() - Self explanatory.
        CapturePiece() - Executed when a piece is captured, self-explanatory.
        MovePiece() - Executed when a piece is moved.
        KingMe() - When a normal checker of either color reaches the opposite side, the piece is magically transformed into a 'King'.
        ForceCaptureScan() - If ForceCapture is enabled, players must capture any piece given the oppertunity. This function scans the board to check if the player is capable of capturing a piece.
        DoubleJump() - After a player captures a piece,  this function scans all squares adjacent to the destination square to determine if the player can 'Double Jump'.
        ValidMove() - Is the player making a valid move, and if not tell them why. (The 'meat and potatoes' of the program...)
        CordinateInput() - When the user keys in tile cordinates, this function ensures they are within acceptable bounds.
        Player1() - Invoked when it is Player 1's turn.
        Player2() - Invoked when it is Player 2's turn.
        
AI.cpp:
    This file is merely a stub for a new feature coming in v2.0.
    Functions:
        AI() - Will be invoked when it is the AI's turn, but for now serves as a stub.
        
Extras.cpp:
    This file is home to extra functions
    Functions:
        ResetBoard() - Sets the board to initial values, black on top, and white on bottom. (No pun intended)
        PrintHeader() - Prints the program's header from Banner.txt
        PrintBoard() - Prints the board and sets pieces.
    
stdafx.h:
    Include file for standard system include files or project specific include files.

Thanks again!

  • Tyler Crockett (Macdaddy4sure)

checkers's People

Contributors

macdaddy4sure avatar

Watchers

 avatar

checkers's Issues

Overhaul ValidMove()

Currently there are nested if statements for 'every' possible piece move condition.
This can be fixed...

Recommend looping through board data scanning for blank squares that are one space diagonal from a white or black piece.

additional capture after 'double jump' board borders

After a double jump that ends at the side of the board the player is allowed another move.

doubleJump() must be called during the player functions. Recommend passing a bool pointer to validMove() and tick the bool when capturing a piece.

this code is bad...

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.