lacolegiala / ot-project

0 stars 0 forks source link

Koodikatselmus #1

Open ljunjoel opened 4 years ago

ljunjoel commented 4 years ago

Koodi ladattu 10. joulukuuta 2019 21.07.

English below!

Suomeksi

Ohjelma aukesi ja toimi mielestäni oikein, kun pelasin pelin läpi. Yritin esimerkiksi valita uudelleen jo valitun kortin, mikä ei onnistunut. Kortit eivät myöskään vaihtaneet paikkaa, joten peli ymmärtääkseni toimi oikein.

Testauksesi on hyvin vähäistä. Testaat nyt yhtä luokkaa kolmesta. Tokikin varsinkin luokka Card on niin yksinkertainen, että sen testaaminen tuntuu ehkä hieman mielettömältä. Gameboard-luokkaa tosin voisi hyvin testata, että se varmasti luo aina taulun oikein. Tämä lienee erityisen hyödyllistä, kun etenet siihen vaiheeseen, että lisäät vaikeusasteet.

Paketointi voisi myös olla hieman selkeämpää, eli paketoisit sovelluslogiikan ja käyttöliittymän omiin paketteihinsa.

Olin lukevinani, että pisteiden lasku tehdään kokonaan käyttöliittymän yhteydessä. Tämä on omasta mielestäni myös helpoin tapa, mutta arviointikriteereiden perusteella tämäkin tulisi tehdä erillisellä luokalla sovelluslogiikassa.

Vinkkivitosena, että voisit lisätä parhaita(tai miksei huonoimpia) tuloksia tallentavan taulukon tietokannan avulla, jolloin täyttäisit tämänkin kohdan arviointikriteereistä.

Nyt on peli perustasolla valmis, onnittelut jo siitä! Nyt on enää kyse parantelusta, joten hirveästi tsemppiä vielä viimeisiin viikkoihin!


In English

The program ran and played correctly from what I could gather. For example I tried to pick a card that I had already picked and it didn't allow it and the cards didn't swap places in the middle of the game so I think the game works as intended.

You have very minimal testing going on, effectively testing only one out of three classes. I think we can both agree that testing the Card class would be a little bit silly seeing it is such a simple class but the Gameboard class could easily be tested for whether it creates a board correctly every time. This would be especially useful while adding difficulties.

Packaging could be done a bit differently as in making a separate package for application logic and UI.

If I understood correctly counting points is done completely withing the UI class which is, even though even I consider it the simplest way, wrong by our criteria.

Just a small tip, if you made a high or low score table(why not both?) you could also satisfy those criteria for using a database.

You've made a working game and for that I already congratulate you! Now it's all about adding more on top of the already working game and maybe fixing a couple of formalities! Best of luck!

lacolegiala commented 4 years ago

Kiitos parannusvinkeistä ja harvinaisen positiivisesta koodikatselmoinnista!