Skip to content

Added Codewars, TV and channels classes task and RPG Saga (feature complete)#24

Open
goutosama wants to merge 46 commits intoISUCT:Chadov_Sergej_Vadimovichfrom
goutosama:master
Open

Added Codewars, TV and channels classes task and RPG Saga (feature complete)#24
goutosama wants to merge 46 commits intoISUCT:Chadov_Sergej_Vadimovichfrom
goutosama:master

Conversation

@goutosama
Copy link
Copy Markdown

No description provided.

Comment thread rpgsaga/saga/.gitignore
@@ -0,0 +1 @@
node_modules
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

по идее gitignore выше должен ловить все node_modules

new Channel('Cartoon Network'),
];

describe('Testing printing TV ASCII', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

тестов очень мало

Comment thread rpgsaga/saga/src/tv.ts Outdated
@@ -0,0 +1,97 @@
export class Channel {
static chCount = -1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

это поле тогда надо делать приватным

@@ -0,0 +1,33 @@

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Сагу отдельно посмотрю

Comment thread rpgsaga/saga/src/tv.ts Outdated
@@ -0,0 +1,97 @@
export class Channel {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 файл - 1 класс

Comment thread rpgsaga/saga/src/tv.ts Outdated
Comment on lines +15 to +17
static channels: Array<Channel>;
static noChannel = new Channel('No Channel');
static tvAsciiParts: Array<string> = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

не злоупотребляйте статическими полями - это почти глобальные переменные, которые могу привести к непредсказуемому поведению

Comment thread rpgsaga/saga/src/tv.ts Outdated
static tvCount = 0;
static channels: Array<Channel>;
static noChannel = new Channel('No Channel');
static tvAsciiParts: Array<string> = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

в ts есть многострочная строка

Comment thread rpgsaga/saga/src/tv.ts Outdated
Comment on lines +38 to +41
brand: string;
model: string;
serialNumber: string;
channel: Channel;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

поля делайте приватными

Comment thread rpgsaga/saga/src/tv.ts

public printedTV(): string {
let channelAscii = '';
if (this.channel.name.length <= 18) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

если что-то было передано не так, то как минимум в 1 месте бросьте exception

Comment thread rpgsaga/saga/src/tv.ts Outdated
this.channel = Television.noChannel;
}

public printedTV(): string {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

вот название не очень соответствует тому, что происходит внутри

goutosama and others added 26 commits December 9, 2023 20:47
…age, calculated through affinity system; lots of names added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants