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

AddTimeToOpponent (clean) #125

Open
wants to merge 79 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
5845c36
[AddTimeToOpponent] moved all change in this PR, previous one was pol…
MartinREMY42 Dec 24, 2021
e695168
[P4Enhanced] P4 and Six coverage bumped and rules utils used for test
MartinREMY42 Dec 26, 2021
9384ba6
[AddTimeToOpponent] PR Comments Wave 1
MartinREMY42 Dec 27, 2021
83a3da7
Merge branch 'develop' of https://github.com/MartinREMY42/multi-game-…
MartinREMY42 Dec 27, 2021
84458f7
[AddTimeToOpponent] Chrono now resynchronised after time add
MartinREMY42 Dec 28, 2021
e0ab44f
[P4Enhance]PR Comment Wave 1
MartinREMY42 Dec 28, 2021
76ff69d
[P4Enhance] pulled develop and fixed conflict
MartinREMY42 Dec 28, 2021
ba387df
[AddTimeToOpponent] Messages after agreed draw enhanced
MartinREMY42 Dec 29, 2021
75369ee
[AddTimeToOpponent] Several should be addable to same chrono twice in…
MartinREMY42 Jan 3, 2022
eb6c072
[AddTimeToOpponent] pulled develop and fixed conflict
MartinREMY42 Jan 4, 2022
0660f59
[AddTimeToOpponent] pulled develop and fix conflict
MartinREMY42 Jan 4, 2022
ee6ae36
[activeparts-missing] Get 100% coverage for active parts, bugfix for …
acieroid Jan 5, 2022
27f5830
[activespart-missing] Improve FirebaseFirestoreDAO types to reflect r…
acieroid Jan 6, 2022
9b2998b
[activeparts-missing] Improve Firestore DAOs
acieroid Jan 6, 2022
83e9942
[activeparts-missing] Fix linter issue
acieroid Jan 6, 2022
7b6cd58
[current-player-color] Remove duplicate function
acieroid Jan 7, 2022
a1bb4db
[current-player-color] Add current player color to tuto & online game…
acieroid Jan 9, 2022
c4afe2f
Merge branch 'develop' of github.com:EveryBoard/EveryBoard into curre…
acieroid Jan 9, 2022
d04ec75
[current-player-color] fix all expect-matcher errors and cover siam p…
acieroid Jan 9, 2022
812cd2c
[current-color-player] More coverage improvements
acieroid Jan 9, 2022
e7fc981
[AddTimeToOpponent] remove use of french false friend 'case'
MartinREMY42 Jan 9, 2022
b8dc6ba
[activeparts-missing] PR comments
acieroid Jan 10, 2022
0445aeb
Merge branch 'develop' of github.com:EveryBoard/EveryBoard into activ…
acieroid Jan 10, 2022
4c1625c
[a,ctiveparts-missing] Cover missing branch in GameService
acieroid Jan 10, 2022
dfe437d
[activeparts-missing] Move some files and rename classes
acieroid Jan 10, 2022
33d142e
[current-player-color] PR comments
acieroid Jan 10, 2022
04c750c
Merge branch 'develop' of github.com:EveryBoard/EveryBoard into curre…
acieroid Jan 10, 2022
63a49f6
[AddTimeToOpponent] adding again coverage file
MartinREMY42 Jan 10, 2022
2880c43
[AddTimeToOpponent] pulled develop from everyboard repo and fixed con…
MartinREMY42 Jan 11, 2022
3b90a28
[P4Enhance] Fixed conflict
MartinREMY42 Jan 11, 2022
b70e433
[Brandhub] Update images
acieroid Jan 11, 2022
deffb0c
Merge pull request #7 from EveryBoard/current-player-color
MartinREMY42 Jan 11, 2022
798b917
Merge pull request #8 from EveryBoard/Brandhub
acieroid Jan 11, 2022
2c1b886
[P4Enhance] pulled everyboard/develop and fixed conflict
MartinREMY42 Jan 11, 2022
a4c4501
[P4Enhance] fix coverage.py and csvs
MartinREMY42 Jan 11, 2022
c1766ed
[P4Enhance] Fix coverage.py
acieroid Jan 11, 2022
659ec4f
Merge pull request #9 from EveryBoard/P4Enhance
acieroid Jan 12, 2022
55ba6af
[AddTimeToOpponent] pulled develop and fixed conflict + PR Comment
MartinREMY42 Jan 12, 2022
181be4f
[AddTimeToOpponent] pulled everyboard develop and fixed conflict
MartinREMY42 Jan 13, 2022
f42f0bb
[activeparts-missing] Better handling of subscriptions
acieroid Jan 13, 2022
995b457
Merge branch 'develop' of github.com:EveryBoard/EveryBoard into activ…
acieroid Jan 13, 2022
9600ff0
[activeparts-missing] Fix new tests
acieroid Jan 13, 2022
de2c912
[AddTimeToOpponent] PR Comment Wave 3.1415926585
MartinREMY42 Jan 13, 2022
455f55b
[activeparts-missing] Further improve subscriptions
acieroid Jan 14, 2022
206563d
[P4Enhance] PR Comments Wave 2
MartinREMY42 Jan 14, 2022
e2f7440
Merge branch 'develop' of https://github.com/MartinREMY42/multi-game-…
MartinREMY42 Jan 14, 2022
7b07480
[activeparts-missing] Refactoring to subscriptions, fix all tests
acieroid Jan 14, 2022
62c323d
[activeparts-missing] Fix linter
acieroid Jan 14, 2022
c8beef1
Merge branch 'develop' of github.com:EveryBoard/EveryBoard into HEAD
acieroid Jan 14, 2022
334dae6
[activeparts-missing] Cover missing branch in part-creation
acieroid Jan 14, 2022
03b959e
Merge branch 'develop' of github.com:EveryBoard/EveryBoard into activ…
acieroid Jan 14, 2022
52751a8
[activeparts-missing] Fix linter issue
acieroid Jan 14, 2022
51dfa1f
[activeparts-missing] PR comments
acieroid Jan 17, 2022
e68cfb4
[improve-awale-and-quarto] Get 100% coverage for Awale
acieroid Jan 17, 2022
9f598a7
[improve-awale-and-quart] Fix conspirateurs component
acieroid Jan 17, 2022
f5c6153
[activeparts-missing] Fix linter
acieroid Jan 17, 2022
81ae90a
[improve-awale-and-quarto] Get 100% coverage of quarto
acieroid Jan 18, 2022
a9d38d4
[activeparts-missing] PR comments
acieroid Jan 19, 2022
f1ec01a
[activeparts-missing] Update version number
acieroid Jan 19, 2022
cb076b9
[activeparts-missing] Remove DomainWrapper and fix lint
acieroid Jan 20, 2022
fac3dc1
[improve-awale-and-quarto] PR comments and fix coverage.py
acieroid Jan 20, 2022
4c434c8
[improve-awale-and-quarto] Last PR comment
acieroid Jan 20, 2022
0d1c3ca
[improve-awale-and-quarto] Use expectToBeCreated for Quarto too
acieroid Jan 20, 2022
11378b6
[AddTimeToOpponent] PR Comment Wave 3
MartinREMY42 Jan 20, 2022
4d03e95
Merge pull request #12 from EveryBoard/improve-awale-and-quarto
MartinREMY42 Jan 20, 2022
3fe432f
[activeparts-missing] PR comments and renamings
acieroid Jan 21, 2022
3b9ce61
Merge branch 'develop' of github.com:EveryBoard/EveryBoard into activ…
acieroid Jan 21, 2022
dc22959
[activeparts-missing] Finalize renaming
acieroid Jan 21, 2022
b78944f
[activeparts-missing] Linter & coverage data
acieroid Jan 21, 2022
dd08381
Merge pull request #6 from EveryBoard/activeparts-missing
MartinREMY42 Jan 22, 2022
1d6f210
Redeploy failed develop deployment
acieroid Jan 22, 2022
91f318a
[AddTimeToOpponent] PR Comment wave 4
MartinREMY42 Jan 22, 2022
8c0391f
[AddTimeToOpponent] removed unused css
MartinREMY42 Jan 22, 2022
0b4c528
[AddTimeToOpponent] change french translation
MartinREMY42 Jan 22, 2022
faac669
[AddTimeToOpponent] Pulled Everyboard/develop and fixed conflict
MartinREMY42 Jan 24, 2022
7c7a7a2
[AddTimeToOpponent] Generate CSV file
MartinREMY42 Jan 24, 2022
bb6334a
[AddTimeToOpponent] rename case sensitivity on file naming
MartinREMY42 Jan 24, 2022
32f9b49
[AddTimeToOpponent] fix translation and linter
MartinREMY42 Jan 24, 2022
0d92ce2
[AddTimeToOpponent] updated coverage and translation
MartinREMY42 Jan 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ module.exports = {
'plugin:jasmine/recommended',
],
rules: {
'@typescript-eslint/no-floating-promises': ['error'],
'jasmine/no-expect-in-setup-teardown': ['off'],
'jasmine/expect-matcher': ['error'],
'jasmine/new-line-before-expect': ['off'],
'jasmine/new-line-between-declarations': ['off'],
'no-warning-comments': [
Expand All @@ -42,7 +45,6 @@ module.exports = {
'@typescript-eslint/switch-exhaustiveness-check': ['warn'],
'@typescript-eslint/no-unused-expressions': ['warn'],
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/no-use-before-define': ['warn'],
acieroid marked this conversation as resolved.
Show resolved Hide resolved
'@typescript-eslint/no-useless-constructor': ['warn'],
'@typescript-eslint/typedef': [
'error',
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
/.sass-cache
/connect.lock
/coverage
! coverage/branches.csv
! coverage/functions.csv
! coverage/statements.csv
! coverage/lines.csv
! /coverage/branches.csv
! /coverage/functions.csv
! /coverage/statements.csv
! /coverage/lines.csv
/typings
acieroid marked this conversation as resolved.
Show resolved Hide resolved
*.log

Expand Down
36 changes: 13 additions & 23 deletions coverage/branches.csv
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
AttackEpaminondasMinimax.ts,1
AwaleRules.ts,2
AwaleMinimax.ts,2
AuthenticationService.ts,1
ActivesPartsService.ts,4
ActivesUsersService.ts,1
count-down.component.ts,1
Coord.ts,1
CoerceoPiecesThreatTilesMinimax.ts,3
GameWrapper.ts,1
GoGroupsDatas.ts,5
HexagonalGameState.ts,3
LinesOfActionRules.ts,1
MGPNode.ts,1
online-game-wrapper.component.ts,11
ObjectUtils.ts,3
Player.ts,1
PylosState.ts,1
PositionalEpaminondasMinimax.ts,1
QuartoHasher.ts,1
QuartoRules.ts,3
SixMinimax.ts,6
SiamPiece.ts,1
ActiveUsersService.ts,1
AttackEpaminondasMinimax.ts,1
AuthenticationService.ts,1
CoerceoPiecesThreatTilesMinimax.ts,3
GameWrapper.ts,1
GoGroupsDatas.ts,5
HexagonalGameState.ts,3
LinesOfActionRules.ts,1
MGPNode.ts,1
ObjectUtils.ts,3
online-game-wrapper.component.ts,13
PositionalEpaminondasMinimax.ts,1
PylosState.ts,1
13 changes: 3 additions & 10 deletions coverage/functions.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
AuthenticationService.ts,2
ActivesPartsService.ts,5
ActivesUsersService.ts,3
NodeUnheritance.ts,1
online-game-wrapper.component.ts,2
PieceThreat.ts,1
PylosState.ts,1
QuartoRules.ts,1
server-page.component.ts,1
SixMinimax.ts,3
ActiveUsersService.ts,3
AuthenticationService.ts,2
online-game-wrapper.component.ts,1
33 changes: 11 additions & 22 deletions coverage/lines.csv
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
AwaleRules.ts,1
AuthenticationService.ts,3
ActivesPartsService.ts,13
ActivesUsersService.ts,3
CoerceoPiecesThreatTilesMinimax.ts,1
GameWrapper.ts,1
GoGroupsDatas.ts,4
HexagonalGameState.ts,6
LinesOfActionRules.ts,1
MGPNode.ts,1
NodeUnheritance.ts,1
online-game-wrapper.component.ts,9
ObjectUtils.ts,2
PieceThreat.ts,1
Player.ts,2
PylosState.ts,1
PositionalEpaminondasMinimax.ts,1
QuartoHasher.ts,1
QuartoRules.ts,5
server-page.component.ts,1
SixMinimax.ts,13
SiamPiece.ts,1
ActiveUsersService.ts,3
AuthenticationService.ts,3
CoerceoPiecesThreatTilesMinimax.ts,1
GameWrapper.ts,1
GoGroupsDatas.ts,4
HexagonalGameState.ts,6
LinesOfActionRules.ts,1
MGPNode.ts,1
ObjectUtils.ts,2
online-game-wrapper.component.ts,11
PositionalEpaminondasMinimax.ts,1
35 changes: 12 additions & 23 deletions coverage/statements.csv
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
AwaleRules.ts,1
AuthenticationService.ts,3
ActivesPartsService.ts,15
ActivesUsersService.ts,5
Coord.ts,1
CoerceoPiecesThreatTilesMinimax.ts,1
GameWrapper.ts,1
GoGroupsDatas.ts,4
HexagonalGameState.ts,6
LinesOfActionRules.ts,1
MGPNode.ts,1
NodeUnheritance.ts,1
online-game-wrapper.component.ts,9
ObjectUtils.ts,2
PieceThreat.ts,1
Player.ts,2
PylosState.ts,2
PositionalEpaminondasMinimax.ts,1
QuartoHasher.ts,1
QuartoRules.ts,5
server-page.component.ts,1
SixMinimax.ts,13
SiamPiece.ts,1
ActiveUsersService.ts,4
AuthenticationService.ts,3
CoerceoPiecesThreatTilesMinimax.ts,1
GameWrapper.ts,1
GoGroupsDatas.ts,4
HexagonalGameState.ts,6
LinesOfActionRules.ts,1
MGPNode.ts,1
ObjectUtils.ts,2
online-game-wrapper.component.ts,11
PositionalEpaminondasMinimax.ts,1
PylosState.ts,1
2 changes: 1 addition & 1 deletion scripts/check-translations.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
python3 ./scripts/check-translations.py
python ./scripts/check-translations.py
if [ "$?" -eq 0 ]; then
echo 'Translations are OK!'
BEFORE=$(sha256sum src/assets/fr.json)
Expand Down
7 changes: 4 additions & 3 deletions scripts/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
print('Usage: %s [generate|check]' % sys.argv[0])
exit(1)

def sort_function(x):
return str.lower(x[0])
def sort_function(file_and_coverage):
return str.lower(file_and_coverage[0])

def to_missing(x):
"Converts from the string AA/BB to the number BB-AA"
[low, high] = x.split('/')
Expand Down Expand Up @@ -53,7 +54,7 @@ def load_stored_coverage():

def generate_in_file(data, path):
f = open(path, mode='w', encoding='utf8')
for directory in sorted(data, key=sort_function):
for directory in dict(sorted(data.items(), key=sort_function)):
if data[directory] > 0:
# Only store if coverage is > 0
f.write('%s,%d\n' % (directory, data[directory]))
Expand Down
8 changes: 4 additions & 4 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/* eslint-disable max-lines-per-function */
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

describe('AppComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
beforeEach(fakeAsync(async() => {
await TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
});
}));
it('should create the app', () => {
const fixture: ComponentFixture<AppComponent> = TestBed.createComponent(AppComponent);
const app: AppComponent = fixture.debugElement.componentInstance;
Expand Down
6 changes: 3 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { AppComponent } from './app.component';
import { HeaderComponent } from './components/normal-component/header/header.component';
import { WelcomeComponent } from './components/normal-component/welcome/welcome.component';
import { LoginComponent } from './components/normal-component/login/login.component';
import { ServerPageComponent } from './components/normal-component/server-page/server-page.component';
import { LobbyComponent } from './components/normal-component/lobby/lobby.component';
import { PickGameComponent } from './components/normal-component/pick-game/pick-game.component';
import { PartCreationComponent } from './components/wrapper-components/part-creation/part-creation.component';
import { NotFoundComponent } from './components/normal-component/not-found/not-found.component';
Expand Down Expand Up @@ -97,7 +97,7 @@ registerLocaleData(localeFr);

const routes: Route [] = [
{ path: 'login', component: LoginComponent },
{ path: 'server', component: ServerPageComponent, canActivate: [VerifiedAccountGuard] },
{ path: 'lobby', component: LobbyComponent, canActivate: [VerifiedAccountGuard] },
{ path: 'settings', component: SettingsComponent },
{ path: 'register', component: RegisterComponent, canActivate: [NotConnectedGuard] },
{ path: 'reset-password', component: ResetPasswordComponent, canActivate: [NotConnectedGuard] },
Expand All @@ -122,7 +122,7 @@ const routes: Route [] = [
HeaderComponent,
WelcomeComponent,
LoginComponent,
ServerPageComponent,
LobbyComponent,
PickGameComponent,
ChatComponent,
PartCreationComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MGPValidation } from 'src/app/utils/MGPValidation';
import { Player } from 'src/app/jscaip/Player';
import { Minimax } from 'src/app/jscaip/Minimax';
import { MoveEncoder } from 'src/app/jscaip/Encoder';
import { MessageDisplayer } from 'src/app/services/message-displayer/MessageDisplayer';
import { MessageDisplayer } from 'src/app/services/MessageDisplayer';
import { TutorialStep } from '../../wrapper-components/tutorial-game-wrapper/TutorialStep';
import { GameState } from 'src/app/jscaip/GameState';
import { Utils } from 'src/app/utils/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
/* eslint-disable max-lines-per-function */
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
import { GameIncluderComponent } from './game-includer.component';

describe('GameIncluderComponent', () => {

let component: GameIncluderComponent;
let fixture: ComponentFixture<GameIncluderComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
beforeEach(fakeAsync(async() => {
await TestBed.configureTestingModule({
declarations: [GameIncluderComponent],
}).compileComponents();
fixture = TestBed.createComponent(GameIncluderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
}));
it('should create', () => {
expect(component).toBeTruthy();
});
Expand Down
Loading