20.2.3 Change Focus Block
When a block is down, you need to add it to the pile and place a new block on top.
The type of the block must be equal to the block in the waiting position. After that,
you need a decide what type the next block will be.
You can write this method in three steps:
- Add the current block to the pile.
- Call the create method of the current block again. The first argument
should be the constant STARTPOS. The second argument is the type of the
block at the waiting position. (Search in the class block for a method
which returns the type.)
- Call the create method of ‘nextBlock’. This is identical to the statement
you previously wrote in the create function of this class.