Results 1 to 4 of 4
- 03-17-2012, 05:14 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Assignment help with how to create scoreboard for tetris game
A popular single-player game called Tetris has different coloured blocks and shapes that fall to the bottom.
The user can rotate the blocks to get a complete solid line of blocks.
This line is then removed.
The aim of this game is to get the highest number of complete lines which will be calculated as scores.
This game keeps a score of users points achieved during every session. The information kept is the user’s name, level, score and lines.
Level ----An increasing number that shows the level of difficulty the user is on. The higher the number, the more fast-paced the game.
Score ---A number that shows the points achieved when a / line(s) of blocks is / are successfully removed.
Lines --- The number of lines that are removed.
This list is only maintained for the top 10 users with the highest scores. If a score achieved is higher than the 10th position, then the new score will replace the old score. The ranking is sorted in a descending order. A typical display of these scores:
Name Level Score Lines
Jazzy 8 25081 211
Peter 7 24099 202
Dave 6 22188 199
Cindy 5 20765 178
Jaskiret 4 18882 165
Robbie 4 17339 145
Elton 3 14328 134
Mel 3 12590 125
Prince 3 9439 102
Aaron 2 5628 88
Based on the information given, create a list that will emulate a Tetris game score list,
with additions of possibly new higher scores, and thus deleting scores that are below the
10th entry in the list. Ensure that the list is sorted at all times from the highest to the
lowest score.
This is my Assignment : can anyone pls help me its urgent
- 03-17-2012, 07:46 PM #2
Re: Assignment help with how to create scoreboard for tetris game
No, it's not urgent. Read the rest of that page to discover why you're not likely to get any help for a question that's nothing more than a homework dump.
Show your best efforts, and ask a specific question, if you expect to get help on a forum.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 03-18-2012, 12:38 AM #3
Re: Assignment help with how to create scoreboard for tetris game
Cross posted?
Hello every user.. Please help in me my java assignment !!!
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 03-19-2012, 05:17 PM #4
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Re: Assignment help with how to create scoreboard for tetris game
Regards Darry
I am sorry it was not my attention to do so....
I have 2 project one in PHP and one in Java which I am quite new.....
As for my question given I have done as below to design table for this info in Dynamic Array list but then I am not sure where I should put my methods for the sorting and how I am suppose to sort the data to the high sore first then input data to be replace in the array list if data is above the data listed in the array and omit the min data.
package Arraytable;
// import java lib. function
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;
public class table extends JPanel
{
JTable jt;
public table()
{
String[] columns = {"Name", "Level", "Scores", "Lines"};
String[][] data = {{"Jazzy","8","25081","211"},
{"Peter","7","24099","202"},
{"Dave","6","22188","199"},
{"Cindy","5","20765","178"},
{"Jaskiret","4","18882","165"},
{"Robbie","4","17339","145"},
{"Elton","3","14328","134"},
{"Mel","3","12590","125"},
{"Prince","3","9439","102"},
{"Aaron","2","5628","88"}};
jt = new JTable(data,columns)
{
public boolean isCellEditable(int data, int columns) {
return false;
}
public Component prepareRenderer(TableCellRenderer r, int data, int columns)
{
Component c = super.prepareRenderer(r, data, columns);
if (data % 2 == 0)
c.setBackground(Color.WHITE);
else
c.setBackground(Color.LIGHT_GRAY);
if (isCellSelected(data,columns))
c.setBackground(Color.GREEN);
return c;
}
};
jt.setPreferredScrollableViewportSize (new Dimension(450,63));
jt.setFillsViewportHeight(true);
JScrollPane jps = new JScrollPane(jt);
add(jps);
}
public static void main (String[] args)
{
JFrame jf = new JFrame();
table t = new table();
jf.setTitle("table");
jf.setSize(500, 500);
jf.setVisible(true);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jf.add(t);
}
}
Similar Threads
-
Normal tetris transform to Tetris with MVC.
By kuburoman in forum Advanced JavaReplies: 1Last Post: 04-24-2011, 10:53 AM -
Breakout game in the assignment 3 cs106
By dage in forum New To JavaReplies: 5Last Post: 03-16-2011, 05:07 PM -
tetris type game--- boundary help
By ftrengnr in forum New To JavaReplies: 11Last Post: 11-09-2010, 10:00 PM -
Trying to make a functioning Tetris game/ why does my board look weird?
By DeusExMachina90 in forum AWT / SwingReplies: 6Last Post: 12-15-2009, 02:33 AM -
Game of Life assignment
By javan00b in forum New To JavaReplies: 4Last Post: 04-28-2008, 05:49 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks