GithubHelp home page GithubHelp logo

prolog-chess-game's Introduction

Prolog-chess-game

Team Members: Bin Hu (bxh171130) & Marcus Chiu (mxc123530)

Project Idea: Prolog Chess Game

Outline of Project

  • Interactive game between:
    • Human v computer
    • Computer v computer
    • Human v human
  • Choosing which player goes first

Game Flow

Each side takes turns (either Human and/or Computer) After each turn/move, check board state

Human Turn

  • Ask for input
  • Sanitize and validate the input which basically makes sure the input is a legal move
    • Queen - can only move horizontally, vertically, diagonally
    • Knight - moves in L shapes
    • Rook - moves horizontally and vertically
    • Bishop - moves diagonally
    • King - can move in any neighboring square
    • Pawn - can only move forward 1 space, or 2 spaces for the first move during game
    • All resultings moves should be within the board space
    • All moves should have a open path with no pieces between starting position and ending position (except for knights)
  • Then it executes the move onto to board state

Computer Turn

  • Given the current board state search all possible moves and calculate its corresponding score
  • Decide the best move based on the score
  • Then it executes the move onto to board state

Check Board State

  • Not End State
  • End State
    • Win Condition - obvious states
    • Lose Condition - obvious states
    • Tie Condition
      • King is not in checkmate and there are no legal moves to the current player
      • If the last 3 moves of each player are the β€œsame”, then tie

prolog-chess-game's People

Contributors

he7850 avatar therealmarcuschiu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

howlcrow

prolog-chess-game's Issues

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.