Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Дубровин Алексей #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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