/
lemal
/
test
Обзор
Документация
Войти
/
lemal
/
test
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
feature
src/main/java/org/example/Player.java
33 строки
615 B
malenno
Im stuck stepmentor
05 сен 2024, 21:43
05 сен 2024, 21:43
7fbaac4
Код
Авторство
О чём код?
package org.example; import org.example.Card; import org.example.RandCard; public class Player { private Card[] hand; private int score; public void handOutCards(){ Card[] cards = new Card[4]; for (int i = 0; i < 4; i ++) { cards[i] = RandCard.get(); } hand = cards; } public Card[] showCards(){ return hand; } public Card showCard(){ return hand[2]; } public void setScore(int score) { this.score = score; } public int getScore() { return score; } } //tied to the way cards are stored