nisaprmst / oop-avatar-duel Goto Github PK
View Code? Open in Web Editor NEWA card game
A card game
If you have already had BattleCharacterCard, why do you still have these attributes on CharacterCard? I think it is better to remove these attributes.
This issue is only a suggestion. You may argue with it (not all the suggestions are true), challenge it, or come up with another idea yourself. Please kindly close this issue after you feel this issue is irrelevant / solved.
Instead of compose the list of cards, isnt it better if you extend the ArrayList<Card>
?
That way, you don't have to redefine get
, add
, remove
.
This issue is only a suggestion. You may argue with it (not all the suggestions are true), challenge it, or come up with another idea yourself. Please kindly close this issue after you feel this issue is irrelevant / solved.
Jika menggunakan map, nilai integernya menjadi tidak terbatas padahal integer menyatakan kolom kartu pada gui nantinya yang terbatas dari index 0-5. Mungkin tipe atribut bisa diganti dengan array statik biasa dengan panjang yang ditentukan.
Change to this
private CharacterCard[] characterRow
private SkillCard[] skillRow
Mengingat sebuah character card bisa di attach dari skill card dari player maupun enemy, maka menggunakan index sebagai penanda skill card yang mana yang mengattach pada sebuah character card menjadi bermasalah apabila ada dua skill card dengan index yang sama (satu dari player satu dari enemy) mengatach sebuah character card.
Solusi dengan mengganti tipe Integer menjadi
private ArrayList<SkillCard> skillLinked;
sehingga apabila character card memerlukan perubahan dari skill card cukup langsung saja melihat array ini saja.
Pada bagian di atas, characterRow harusnya skillRow
Pada bagian ini, removeFromHand tidak mengambil dari tangan melainkan dari deck.
Solusi deck
dirubah menjadi cardsInHand
Thankss
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.