Code Monkey home page Code Monkey logo

chessproject's Introduction

Chess Online

This is a group project for 3rd year Computing in Software Development at GMIT.

Getting Chess Online running locally

Prerequisites

We recommend using Docker to get Chess Online running locally.

You'll need to have git and Docker installed before you begin.

Installing

First clone the repository

git clone https://github.com/chatton/ChessProject.git

navigate into the newly created directory

cd ChessProject

You'll need to build the docker image locally. This step may take 10-15 minutes the first time you run it. Every other time it should only take a few seconds (unless you delete the docker images.)

docker build -t chess-online .

Finally you can set up all the required containers with the command

docker-compose up

if you navigate to localhost:80 you'll have the app running locally.

If you want to clean up the containers, run the command

docker-compose down

Running PyBot

If you want to run the bot locally, you'll need to have Python 3.6.5+ installed.

The bot needs the requests module as a dependency. So you'll need to install that first.

pip install requests

for instructions on running the bot, see the Wiki page;

Making changes locally

If you want to edit the code and apply your own changes, some additional steps are required.

Spring Boot / Java

This application requires a MySQL database running on port 3306 with a database called "chess_db".

If you make any changes to the java code, make sure to re-build the jar. You can use your preferred IDE or run the command

mvn clean install -DskipTests

from the root of the project.

You can find Maven here if you don't have it installed already.

React Font End

You'll need to have yarn installed. You'll need to re-build the project any time any changes are made. We recommend running the command

yarn run build

This will watch the project for changes and rebuild the react project each time. The Java server will need to be restarted any time you change these files.

PyBot

There shouldn't be any additional steps required here. You can edit the code and re-run the script. (The Java server expects the script to behave in a certain way and take certain arguments, so some changes may be required in ChessService.java if extensive changes are made to the bot)

Authors

License

This project is licensed under the MIT License.

chessproject's People

Contributors

chatton avatar damiangavin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chessproject's Issues

Post request

Figure out how to send a post request with jQuery to spring boot.

Duplicating Player

Major issue with new game being put into the database. Need to analyse springboot and hibernate, Possibly Javascript

Duplicate code

There is some duplicate code in some of our pieces(Rook and Bishop). Maybe we could make another abstract class?

Repeat turn

Sort that each colour can only take one turn at a time

CHECKMATE

Need to research which checkmate logic would suit this project best.

CLICKER

Convert clicks into Js object which can be sent to Java server

Chess board

Map the board to official chess notation ie A-H, 1-8

Create a Game and Player class that will utilize the ChessBoard class

The game class will be the way that the chess board is used. For every 2 clients connected, there will exist 1 Game object which consists of 2 players. We can maintain a map of game id -> Game to keep track of them, and require the game id to be sent as a URL parameter when making GET or POST requests.

ChatBox

Allow players to chat to each other via chatbox

Implement unimplemented methods

There are unimplemented methods in the different Piece subclasses, the ChessBoard class and the ChessFactory class which need to me implemented, currently they just throw new NotImplementedException().

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.