Skip to content

Conversation

@Griboedoff
Copy link

No description provided.

@honest-hrundel honest-hrundel changed the title master Дубровин Алексей May 3, 2018
@honest-hrundel
Copy link

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link

🍏 Пройден линтинг и базовые тесты

@savichev-igor
Copy link

🍪

@honest-hrundel
Copy link

🍏 Пройден линтинг и базовые тесты

Copy link

@evgenymarkov evgenymarkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Круто, пофиксить пару моментов и готово)


_save() {
const value = [this._energy, this._happiness, this._hunger, this._volumeLevel].join('|');
document.cookie = `state=${value}`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это, конечно, работает. Но в будущем для таких вещей лучше использовать localStorage.


sleep() {
this._sleepId = setInterval(() => {
this.energy++;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Бодрость накапливается после смерти

hear() {
this._hearId = setInterval(() => {
this.happiness++;
if (this.happiness === 100) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Продолжает слушать при 100

@evgenymarkov evgenymarkov removed their assignment Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants