Presentation is loading. Please wait.

Presentation is loading. Please wait.

 What is the game about?  Looking into the algorithm  Looking into the code  Complexity and conclusions.

Similar presentations


Presentation on theme: " What is the game about?  Looking into the algorithm  Looking into the code  Complexity and conclusions."— Presentation transcript:

1

2  What is the game about?  Looking into the algorithm  Looking into the code  Complexity and conclusions

3  Board game  2-4 players and requires a dice  Objective of the game?

4  We divided the algorithm into 4 parts › Game configuration › Lojtar Ushtar › Game control panel › Graphics

5  index = f(key, array_size) We create a hash map with keys name of the colors and the value of the colors. Complexity of the creation of this hash is O(n).

6  We have created functions that get the colors and the coordinates of the boxes.  These functions are trivial and don’t effect the complexity.

7

8  We initialize an array named Ushtaret with 4 elements. for(int i=0; i<4; i++){ ushtaret [i]=new Ushtar(GameConfig.getInstance().getColor(index),index);  We also create a function to see if a player has soldiers in the game: for(int i=0; i<4; i++){ if (ushtaret[i].isSelectable() && ushtaret[i].getIndex()>=0) return true;

9  In this file we also have the functions to get the number of soldiers  Set and get the goals and increase the goals

10

11  The main functions are the ones that set and get the index value of the soldier position  Also it has some functions which don’t effect the complexity such as creating the soldier form and color

12

13  This file has the functions that create the main game panel which contains the buttons, labels etc.  This is the part where the dice roll is created

14

15  The graphics is divided in separate files which interact with each other.  Creates the main board where the game takes place

16

17


Download ppt " What is the game about?  Looking into the algorithm  Looking into the code  Complexity and conclusions."

Similar presentations


Ads by Google