Code Monkey home page Code Monkey logo

chess's People

Contributors

yifu avatar

Watchers

 avatar  avatar

chess's Issues

Trouver un nom d'appli

crafting skill - online chess
for the win - online chess

La mention "online" doit apparaitre pour favoriser les resultats dans les outils de recherche.

Nom de boite:
frame four software

Creer un systeme de log.

Un system de log permet de rejouer plus facilement des bugs trouver. Et donc de reproduire des problemes plus facilement.

Revoir le systeme de 'check'

Il faut implementer une machine a etat. Deux variables: une pour le roi blanc et l'autre pour le roi noir.
Cette variable is_xxx_king_cheched a deux etats: true ou false.

Tout movement pour etre legal doit:

  • faire passer le roi de la couleur du joueur qui a le trait de non-checked a non-checked, ou de checked a non-checked.
  • faire passer le roi de la couleur adverse de non-checked a non-checked, ou de non-checked a checked.

Si un joueur a le trait, mais n'a aucun mouvement a disposition, alors la partie est finie. Si son roi est dans l'etat 'checked' alors la partie est perdue pour lui. Si il est 'non-checked', alors il y a egalite.

drag and drop feature

We must be able to drop a txt file into the menu and open the chess party into the application.

Refactor game engine

It must follow a tree organisation.

A game contains a list of children. And a boolean to indicate whether the children have actually been generated or not. Thus when the boolean is true but the children list is empty it means no move is possible: it's a endgame, either a checkmate or a stalemate.

The goal is to remove the apply_move() function and unclutter processing moves in two different parts of the code. As a consequence the code inside the generate_*() functions will modify the generated pieces statuses (captured and moves somewhere else).

Implementer un moteur reseau

Les appels a read ou write peuvent retourner prematurement. Il faut gerer ces cas? Signal hardware ou signal handler? Quoiqu'il en soit il vaut mieux gerer.

Filtrer les evenements de souris

Quand l'utilisateur ne drag aucune piece, alors l'application n'a pas besoin de repondre aux evenement de souris, autrement la fenetre est repainte a chaque deplacement de la souris et prends du CPU inutilement.

refactoring?

  • lightweight with 'heavy' protocol
  • two threads: network thread controller thread and the SDL thread. The SDL thread pushes events into the network thread using a pipe. The controller thread then call poll()/select() in order to wait for events.

Deal with reconnection/resynchronisation issues

Quand un client se deconnecte il doit pouvoir recuperer sa partie en cours comme si de rien n'etait.

  • Il faut stocker chaque etape de la partie sur disque.
  • il faut numeroter chaque movement, lorsque l'utilisateur se reconnecte il indique le dernier movement vu.
  • Il faut rajouter un 'game id'. Si l'utilsateur se reconnecte. La partie n'a peut etre plus court.

Decide on a heavy or lightweigh client app

Heavy
  • Pro: light network protocol
  • Con: Less network traffic: easier on battery life (iphone, ipad, macbook. etc)
Lightweigh
  • Pro: The lighter, the easier to fix bugs : only need to upgrade the server.
  • Con: Bigger network protocol? Report all the board each turn? Report all the next valid moves?

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.