public class Key
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
A
If the value is set to true, then the "A" button will be pressed.
|
boolean |
B
If the value is set to true, then the "B" button will be pressed.
|
boolean |
C
If the value is set to true, then the "C" button will be pressed.
|
boolean |
D
If the value is set to true, then the "Down" button will be pressed.
|
boolean |
L
If the value is set to true, then the "Left" button will be pressed.
|
boolean |
R
If the value is set to true, then the "Right" button will be pressed.
|
boolean |
U
If the value is set to true, then the "Up" button will be pressed.
|
Constructor and Description |
---|
Key()
This constructor initializes all keys to false, or not pressed.
|
Key(Key key)
This is the copy constructor of the Key class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
byteToBinary(int b)
Converts a byte value to a boolean value.
|
Key |
convertByteToKey(byte keyByte)
Converts the key represented in byte to the key represented in boolean
|
void |
empty()
Resets all keys to false, or not pressed.
|
public boolean A
public boolean B
public boolean C
public boolean U
public boolean R
public boolean D
public boolean L
public Key()
public Key(Key key)
key
- An object keypublic void empty()
public Key convertByteToKey(byte keyByte)
keyByte
- The key represented in bytepublic boolean byteToBinary(int b)
b
- a given byte value