Git Product home page Git Product logo

tablutcompetition's People

Contributors

agalassi avatar andreaterenz avatar danysan1 avatar federico-terzi avatar filloax avatar giuluck avatar lorisgiann avatar simone999 avatar thelillo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tablutcompetition's Issues

State.java hashCode broken

Two different istances of it.unibo.ai.didattica.competition.tablut.domain.StateTablut have equal values but different hashCodes.
The problems is in turn related to .hashCode() invoked on java matrix representing the board. This is because hashCode default implementation for Array is the same of Object!

Here's a junit5 test case to reproduce the problem:
TestHashCodeState.txt

Mangiata re con trono

Ho notato che nella situazione in figura la mossa del nero C6 -> C5 non provoca la mangiata del re.

screenshot_1-1
screenshot_1-2

Nel seguente caso invece il re viene mangiato regolarmente.

screenshot_2-1
screenshot_2-2

Nel caso fosse utile allego anche i file di log delle due partite.

gameLog_1.txt
gameLog_2.txt

Problema nel nome del giocatore nero

Al nome del giocatore nero non viene applicata la funzione di cancellazione dei caratteri invalidi. Nell'esempio allegato la stringa che viene passata è sempre la stessa ma il server li gestisce in maniera diversa.
Schermata del 2019-05-22 16-58-31

Aggiornamento stato nella gui

Problema che non c'entra con le regole del gioco:

Lanciando da terminale un random contro uno human, abbassando la finestra della gui e continuando a giocare da terminale lo stato viene comunicato correttamente a entrambi i giocatori, ma la gui non viene aggiornata e anche rialzandola la situazione non cambia.
Lo faccio presente casomai qualcuno lo utilizzasse, ho provato anche random vs random e human vs human e mi pare che in quei casi non si verifichi questo problema.

Cattura di un pezzo

Non ho capito una cosa delle regole: il Trono funge da sponda indipendentemente dal colore della pedina che deve essere mangiata giusto?
L'accampamento invece funge da sponda solo per i Neri che mangiano oppure anche per i Bianchi?

Bug relativi al "mangiare una pedina"

@AGalassi
Allego due screenshot per due possibili problemi.
Muovendo la pedina bianca da E3 a A3 ottengo che la pedina nera in posizione A4 viene mangiata (anche se l'accampamento di posizione A5 è coperto da una pedina nera). È un funzionamento corretto? Dalle regole delle slide non è chiaro se questo sia corretto o meno.
Schermata del 2019-04-08 12-45-08

Secondo "problema": se muovo la pedina nera da posizione E2 a E3 NON mangio la pedina bianca in posizione E4, questo è corretto? Dalle regole si evince che il castello "fa da sponda" indipendentemente dal fatto che il re sia dentro o fuori dallo stesso. È corretto? Allego schermata anche di questo.
Schermata del 2019-04-08 12-45-20

Unusual switch syntax

In ReplayServer.java, in the getStateFromLines(), the switch block uses an unusual syntax (-> instead of :, and lacks break commands), which is not compatible with Java 11

Outdated README

  • the README proposes Java 8, but the String.strip() method is used in ReplayServer.java, which is only compatible with Java 11+
  • in the "Replay function" section of the README, it would be useful to also include the ant server-jar command, used to generate the server.jar file mentioned there

Giocatore Random rimane con una sola pedina: IllegalArgumentException

Giocando come giocatore Random alle linee 153 e 239 della classe TablutRandomClient Random.nextInt viene chiamato con argomento pawns.size() - 1 che risulta essere 0 essendoci solo una pedina rimasta.

Questo lancia una IllegalArgumentException: bound must be positive che fa perdere la partita al giocatore.

E' un problema secondario, e non relativo alle regole del gioco, ma volevo comunque segnalarlo.
Saluti

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.