Skip to content

chaehyunL/java-racingcar-simple-playground

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

자동차 경주 1,2단계 구현

Car 객체 생성

자동차 이름, 자동차의 위치=0 을 기본으로 설정.

0-9까지의 정수 값을 입력받음.

  • 4이상일 경우, 전진
  • 4미만일 경우, 그대로 유지.

GetWinners 기능 구현

N회를 반복한 이후, 여러개의 자동차들 중, 우승 자동차들을 구함.

  • far값에 자동차들 중 가장 멀리 간 position 정수를 구함.
  • 가장 멀리 간 값들과 일치하는 자동차들의 이름을 구함
  • "@@,@@,@@가 최종 우승했습니다."형식으로 출력.

About

초록 스터디 자바 기초 과정 자동차 경주 미션을 위한 저장소

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%