• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need logic for this game.

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I need a logic/algorutham for the specification which is mentioned below

Purpose:
● The goal of this exercise is to develop a JAVA puzzle game which is a "variation" of the
Tetris game.
● We are interested in seeing your code writing skills, style and logic.
Don't hesitate to comment on your code in order to make it as clear as possible.
● The purpose of this exercise is purely a skill assessment, and gameplay implementation
ability.
Rules of Game:
● there a 5 different Elements, each with one specific color (so 5 color)
● Element pair are created every X milliseconds, X decrease every 2 minutes of gameplay
X = 2sec at beginning of the game
Elements pair appear at random position on the first top line of the Gameboard
they, then, come down from the top until they stack up on top of other Element or on the
Gameboard border
● at the beginning of the game, the Gameboard will be randomly filled with some Element
the number of element is up to you (could be dependent on the level selected by the player)
● the user control a cursor
he can move it up, down, right, left and select an Element which does not move(fixed
Element) (so cannot select an Element from the moving pair)
● when the user select a fixed Element, he can then press one direction (up, down, right, left)
if there is another fixed Element in the adjacent cell in this direction, both Element (selected
one + one in given direction) switch position
● When four Element of same color are connected in a tetris shape, they are removed from the
game board
All Element above those about to be cleared will then fall until they land onto other Element
or border of the Gameboard.
the valid combination of tetris shape are :
● game is over when gameboard is full, and no more Element pair can be added
the game score will be a combination of nb of tetris-shape removed and how long the player
played before he lost
Note:
● this is a speed game the user will be forced to loose at some time
● the control of the cursor is not synced with the creation of a new Element pair, both are
desynchronised event
● in the "res"directory you will find the graphic resources that you can use for this test
To Submit:
● Please submit a java console application that will open a window and start the game.
● You may attach a separate text file that documents player controls and any other comments
(as gameplay improvements, bugs not corrected, any comment that will help evaluate your
submission...)
Important:
● JAVA only
● java console application (not an applet)
● ALL COMMENTS IN ENGLISH


Please give inputs where i can get this ..... help me help me
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no quick answer to this - you are asking someone else to design your software for you (which also appears to be for some sort of assignment). And we are NotACodeMill. What have you designed so far? Where are you stuck? Feel free to ask questions with example of your work. People will help.
[ September 17, 2008: Message edited by: Paul Sturrock ]
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:
.. you are asking someone else to design your software for you (which also appears to be for some sort of assignment).



If I am not very mistaken this is the first round of your job interview.
I know a company in India, which takes this approach.
You are typically given a problem to solve (like the one posted by the OP)
Once you submit your solution, you are invited for technical discussions regarding your code. Nowhere in this discussion are you asked typical "interview" questions, but you have to sort of undergo a "viva". These technical discussions typically comprise of multiple rounds. The whole focus is on the company trying to gather what you really know and not what you have read in books.

If this is an interview assignment, I would strongly recommend the OP to try and fix it himself, instead of looking for ready made solutions.
At the end, even if you dont land the job, you will surely have gained immense tips and tricks, which are seldom mentioned in any book.
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats a pretty big job interview/assignment.
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic