Giter VIP home page Giter VIP logo

csefest18bomberman's Introduction

CSEFest18Bomberman

Map Description:

I : Indestructible Wall

W : Destructible Wall

B : Bomb

P1, P2, P3, P4 : Player

+ : Increase Bomb Size

O : Increase Bomb Count

. : Empty Space

Classes:

Visualizer : Pygame handler, not the contestant's concern

MapData : Contains game information
	Every Function need to be called with the player object as the first parameter.
   (Functions starting with __ is private and not normally callable)
   schedule_bomb                        -> Place a bomb on current position
   schedule_move (Direction: N/S/E/W)   -> move to given direction
   skip_turn                            -> Do nothing in current turn
   get_full_map                         -> Provides the current map
   get_self_data                        -> Provides own info
   get_player_data (Index: 1,2,3,4)     -> provides information
   get_all_bombs			    -> provides bomb data

Player Data : A Dictionary Containing
    "coordinate"                        -> Position
    "bomb_size"                         -> Explosion Radius
    "bomb_count"                        -> Number of Bombs that can be deployed at a time
    "index"                             -> Player Index
"point"				    -> Current Point of Player

Bomb Data : A Dictionary Containing
    "coordinate"                        -> Position
    "radius"                            -> Explosion Radius
    "player_index"                      -> Index of the player placing the bomb
"time_till_detonation"		    -> Ticks remaining till the bomb explodes (this is initially 7)

Player : Written by contestants, a sample is given.

What has to be done:
    1. Have variables reset, done, success, index initialized at __init__ function
      restart   -> Start next round
      done      -> Indicate game over
      success   -> Notifies if last action was successful
  index     -> Your position in game
  		1 -> Upper Left
		2 -> Lower Right
		3 -> Lower Left
		4 -> Upper Right
    2. Have exactly one call to any of
      -> schedule bomb
      -> schedule_move
      -> skip_turn
  in the main playing loop. While it is encouraged to name this method "play", it is not mandatory.
    3. Execution of a round :
  -> After all players schedule their moves, the processor will execute all necessary actions to complete those moves.
  -> After execution, the reset variable of each living player will be set to true.
  -> If a player dies, over variable of that player will be set to true.
  -> It will be the players' duty to make sure it does not schedule any more move after the over variable is set to true.
  -> If reset is true and over is false, the player can attempt to schedule the next move. Note that if you do not set the reset variable back to false you will not be able to prevent scheduling multiple times before one round is over.
  -> Attempting to schedule multiple action in one round will result in disqualification.
    4. Attempting to call private functions or edit internal variables will result
       in disqualification

Game End:

1. The game will last for 300 turns (subject to change)
2. Every block broken will award one point to the breaking player.
3. If there is only one player on the field, that player will be the winner.
4. A dead player cannot win, regardless of points accumulated.

csefest18bomberman's People

Contributors

aahmed109 avatar rfshahrear avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

awsafalam

csefest18bomberman's Issues

More confusion

what get_player_data(self, target_player_index) function will return ? and what is target player index ?

I am not under the restart issue "reset restart to false when it's true and then starting next round"?
it will be better if explained clearly .
thank you

player.over not being set.

When my character dies in an explosion, the self.over variable isn't being set to true, so my character reappears on the map. Do I have to manually check if my character was in an explosion and set the variable to true?

PS: I looked into the processor code. The part which is supposed to set the player.over variable to true checks the condition if the y coordinate of the player is equal to the pair coordinates of the bomb (line 139 of Processor.py). Shouldn't the line be
"if self.__player_data[player]["coordinate"] == (bomb[1][0] +i+1 ,bomb[1][1])" ?
I may be completely wrong so please correct me.

Some confusions...

in the graph p1,p2,p3,p4 will denote 4 players .But which one will indicate my location ?
what is the initial bomb count for each player ?
what is the time interval(how many ticks) between placing a bomb and bursting it ?
what is the radius of the bomb ?
should we need to find it out by inspection the code ??

Cannot Open Image File

I just wanted to simulate the game . And executed the programme Visual.py and got the following error .

Scheduling Move
Scheduling Move
Executing Tick
Traceback (most recent call last):
File "Visual.py", line 204, in
main()
File "Visual.py", line 196, in main
game.update_map(players)
File "Visual.py", line 98, in update_map
self.gameDisplay.blit(self.get_image(image),
File "Visual.py", line 53, in get_image
image = pygame.image.load("Images\" + canonized_path)
pygame.error: Couldn't open Images\unbreakwall.png

#Confusion_and_confusion

1.How to get other player's,where they are placing boms,destructable walls co ordinate?.

2.You told about the parameters namely : restart, done, success, index. Well, do i have to pass it through play method or i can write my own method??

3.About the map:

  • what is the point of second portion of the map?.The visual.py does't do anything about that?.then why that part is available?.I mean:
    ".................
    .................
    .....+...........
    .................
    .................
    .................
    .................
    .................
    .................
    .................
    .................
    .................
    .................
    ................." this part?

Hoping for the solution to those ""can't understand issues"" .Thanks.
(n.b:I might ask some dumb questions but to be honest i can't get those points)

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.