seljukgulcan / cs319-element-wars Goto Github PK
View Code? Open in Web Editor NEWBilkent CS319 2014 Fall Group 8 Term Project
License: MIT License
Bilkent CS319 2014 Fall Group 8 Term Project
License: MIT License
As you know, for user interface we need to code CardGraphicCreator class which simply creates a visual card on the screen. It takes a Card object and creates proper graphic for the card.
Bildiğiniz üzere kullanıcı arayüzü için bir tane CardGraphicCreator isimli bir class yazmamız gerekiyor. Bu class'ın yaptığı iş: Bir tane Card objesi alıyor ve bu Card objesine uygun bir graphic oluşturuyor.
Consider the following card information:
Mesela aşağıdaki kartı düşnürsek
name:skeleton
cost:3 air element
artwork:1.png
description:
type:
attack:4
defence:6
Firstly, we must put a background image which is specific to element (air in this case). Then we must put a layout image which is common in all character cards. Energy icons are added next. Then name, description, type and attakk-defence values must be added.
Öncelikle kartın enerji tipine özel bir arkaplan resmi koyuyoruz. Sonra basit bir layout ekliyoruz ve enerji ikonlarını kartın sağ üst köşesine koyuyoruz. Son olarak atak, defans, isim, tip ve açıklama bilgilerini ekliyoruz.
Below there is some information about card graphic. Some of them may be changed in the future so this situation should be considered.
Kart grafiğiyle ilgili bazı bilgiler aşağıda. Bu bilgiler ileride değilebileceği için, bu durum göz önüne alınarak kodlama yapılmalı.
Card Size: 600px - 900px
Artwork Image Size: 530px - 360px
One Energy Crystal Size: 48px - 48px
Text Font: Cambria Math Regular
Title Font Size: 42px
Type Font Size: 42px
Description Font Size: 30px
Attack-Defense Font Size:96px
Note: There is a 1px black stroke around all texts.
There are some pictures below, that will be used. Some of them can be changed but there will no problem since we don't change their size.
Aşağıda grafiği oluştururken kullanılacak bazı resimler var. Bunlar kullanılabilir denemek için.
Different Backgrounds for Characters Associated with Different Type of Energies
After class creates the graphic, it should be like these: (Note: The image at the top is more correct)
Sonuç aşağıdaki kartlara benzer bir şey olmalı. Aşağıdaki kartta ufak tefek hatalar var, yukarıdaki daha doğru
Aşağıda bazı kaynaklar var yardımcı olabilecek:
http://stackoverflow.com/questions/2318020/merging-two-images
http://www.youtube.com/watch?v=9QZksBHFKZk
As you know, the game keeps user decks in external text files. The game should import these files and convert into Deck objects. Text files have .deck extension and contain card id's. The number in the first line (n) represent the number of cards in the deck, and following n lines represent card id's. For example: There are 12 cards in the deck and these 12 cards are listed under '12'
Oyun kullanıcı destelerini .deck uzantılı dosyalarda tutuyor. Gerektiğin bu desteleri oyuna aktarabilmemiz lazım. Bunu DeckImporter class'ı yazacak. import( String idOfDeck)
fonksiyonu çağrıldığında decks/idOfDeck
.deck dosyasını çekecek. Bu dosyanın ilk satırı, destenin kaç karttan oluştuğunu gösteriyor. Kalan satırlar ise kartların id'lerini gösteriyor. Örnek: 12 kartlık bir deste. Fonksiyon sonuç olarak bir Deck objesi dönecek.
12
2
2
2
89
89
75
123
27
3
5
6
6
What this class should do:
Bu class'ın yapması gerekenler
How to use Deck, Card and CardImporter classes
Deck d = new Deck();
//Get card id's from deckId.deck file.
for each card id
Card c = CardImporter.loadCard( cardId);
d.add( c);
return d;
Extra: Write DeckExporter class which does opposite thing of what this class does.
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.