팀 구성 처리용 class.
당연히 연결된 structure도 다 구현해야 합니다.
딴 놈들도 해당되는 놈들은 안적어 놨어도 알아서 잘 센스있게 해주세요.
TeamOrganizer()[생성자]
미정
storeCommand(from: Integer, to: Integer, type: Integer): Void
activityQ에 입력받은 data를 기반으로 entry를 추가하여 append
loadTeam(id: Integer, teamNo: Integer, uniqueNo: Integer): Void
입력받은 data를 기반으로 team list를 생성. id는 학번이며, uniqueNo는 개인 번호. teamNo와 uniqueNo가 동일하면 팀장이 되어 해당 학생의 id가 team entry의 leaderNo에 들어감.
findTeamNo(id: Integer): Integer
입력받은 id 값을 가지고 team에서 해당되는 id를 가진 team entry의 teamNo 값을 반환. team이 존재하지 않다면 에러메시지 출력
findLeaderNo(teamNo: Integer): Integer
입력받은 teamNo값을 가지고 team에서 해당되는 teamNo의 leaderNo 값을 반환. team이 존재하지 않다면 에러메시지 출력
executeActivity(command: TeamActivity): Void
command로 입력받은 TeamActivity의 값을 Bang.sendMessage를 호출하여 전달.
이때, 해당 메서드의 to에 해당하는 id값을 TeamOrganizer.findTeamNo와 TeamOrganizer.findLeaderNo를 호출하여 명령에 맞는 대상의 id를 return 받아 입력.
deleteTeam(teamNo: Integer): Void
입력받은 teamNo값에 해당되는 team entry를 list에서 제거
getSwitch(): Bool
현재 organizeSwitch 값을 return
getLimit(): Integer
현재 teamLimit값을 return
setSwitch(stat: Bool): Void
switch 상태를 입력받은 stat값으로 설정.
setLimit(limit: Integer): Void
teamLimit값을 limit로 입력받은 값으로 변경 (단, 변경 시도 시 switch의 상태가 off인 경우에만 설정이 가능하다.)
cleanQ(): Void
switch off 되는 경우 실행. activitiyQ의 모든 entry를 제거
팀 구성 처리용 class. 당연히 연결된 structure도 다 구현해야 합니다. 딴 놈들도 해당되는 놈들은 안적어 놨어도 알아서 잘 센스있게 해주세요.