JAVA 프로그래밍

문제

캐릭터가 칼(/), 창(->), 방패([), 활(D) 중 아이템 하나를 획득하기 위해 한 칸 이동하는 문제입니다 이를 해결하는 프로그램의 다음 실행상태에 대해 빈칸을 채우세요 

프로그램의 실행순서 및 실행상태

1  public static void main( String[] args ) {  

2   System.out.println( "      -> \n" );
      / 
[ 옷 D
->


3   char direction= scan.next().charAt(0);
WASD와 [Enter]를 입력하세요: a
                     main()
scan  (Scanner) 
 direction

4   System.out.print( " \033[2;6f  " );
      / 
[ D
->


5   switch( direction ) {

6    case 'w': case 'W': 

9    case 'a': case 'A': 

10     System.out.print( " \033[2;1f 옷] \033[7;15f" );
      / 
옷] D
->


11     break;

17  }


프로그램 코드

	import java.util.Scanner;
		
	public class WeaponItem
	{
1		public static void main( String[] args ) { 	
			Scanner scan = new Scanner( System.in );
			System.out.println( "      / " );
			System.out.println( "  [   옷   D" );
2			System.out.println( "      -> \n" );
			
			System.out.print( "방향키(WASD)와 [Enter]를 입력하세요: " );
3			char direction= scan.next().charAt(0);
		
4			System.out.print( " \033[2;6f  " );
5			switch( direction ) {
6				case 'w': case 'W': 
7					System.out.print( " \033[1;6f 옷/ \033[7;15f" );
8					break;
9				case 'a': case 'A': 
10					System.out.print( " \033[2;1f 옷] \033[7;15f" );
11					break;
12				case 's': case 'S': 
13					System.out.print( " \033[3;6f 옷-> \033[7;15f" );
14					break;
15				case 'd': case 'D': 
16					System.out.print( " \033[2J \033[4;15fSUCCESS! \033[7;15f" );
			}
			scan.close();
17		}
	}