You now have all the skills you need to build the soccer game introduced at the beginning of the chapter. The game might appear complex if you look at the entire thing at once, but when you break it into its constituent parts, the soccer game isn’t nearly so intimidating.
As usual, the variables tell you a lot about the program. The Soccer program features a large number of variables declared at the form level, but they are not tricky.
The first group of variables is used to give names to the various positions:
//set up constants for players private int GOALIE = 0; private int FULLBACK = 1; private int HALFBACK = 2; private int WING = 3; private int CENTER = 4; private ...