I am currently making a small Java program which features multiple rooms. I am still new to Java so the less complicated the code, the better.
The player has to be able to travel between rooms, but can only do so via the "go (direction)" command, eg: go west.
How do i split this input so i can call my travel method when the player enters "go" as the first part of their input?
At the same time, a direction will need to be registered so the game knows what the next room will be. (Split the second part of the input).
Help will be much appreciated.