zondag 3 april 2011

Looking through java sourcecode on the Internet.

I am looking through sourcecode on the Internet. At the moment I am looking through Tetris sourcecode. http://www.itsolutions.ru/dhtml/java_tetris.htm It's using a thing called figure and I am looking on google what I can find on that java command/thing. Maybe it is a class.
The last days I keep finding new things when I am reading through Java pages. Nano Timing, Synchronizing, Pooling. The list goes on.

I am about to open up a cold beer. It is starting getting more hot outside. The winter is over. I hope the heating bill stays low. I did use the heating this winter. There were years that I had to pay a thousand euro's on it. That is a lot of money.

The figure word in the sourcecode seems to be a class. I think classes can be used to store lines of variables and things that java has,. Maybe you can create multiple classes of the same name. I am using The search function to jump to every figure reference. I need to find where it is created and if it is done multiple times.

I have to go to the supermarket in a moment. They are selling movies for 99 cents. I bought 5 of them recently. That will take away my study time.

I think you can after you created a new class use variables and more class things by using it calling name and a dot followed by the variable name.

classname.xlocation = 10


The programmer look to have used a boolean array for storing the shape of the blocks. I think booleans are variables that hold either 0 or 1.

The sourcecode seems to be using a thread for the game loop but it has not been implemented by using the extends runnable thing. I still do not really understand how to create and use classes in java. You seem to have to initialize a thread in the initiation/header part of the java code.


Geen opmerkingen:

Een reactie posten