Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

fix: Adjust parameters for rated game #72

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/map-designer/src/Parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class Parameters {

static mapTileOffsetY = 256;

static totalCoins = 10000;
static totalCoins = 5000;

static mapLocalStorageKey = 'cc-map-designer-map';
}
4 changes: 2 additions & 2 deletions packages/map-designer/src/config/TowerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export default class TowerConfig {
'tower1',
'tower_round.png',
'tower_round_thumbnail.png',
100,
25,
),
new TowerType(
3,
'tower2',
'tower_square.png',
'tower_square_thumbnail.png',
200,
50,
),
];
}
8 changes: 4 additions & 4 deletions packages/renderer/src/config/TowerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ export default class TowerConfig {
'tower1',
'tower_round.png',
'tower_round_thumbnail.png',
100,
400,
4,
100,
25,
),
new TowerType(
3,
'tower2',
'tower_square.png',
'tower_square_thumbnail.png',
100,
600,
6,
100,
50,
),
];
}
4 changes: 2 additions & 2 deletions packages/renderer/src/config/TroopConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import TroopType from './TroopType.js';

export default class TroopConfig {
static readonly troops: Array<TroopType> = [
new TroopType(10, 3),
new TroopType(10, 3),
new TroopType(10, 2),
new TroopType(20, 4),
];
}
10 changes: 5 additions & 5 deletions src/components/BattleTV/BattleTV.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ function PaginatedItems() {

const itemsPerPage = 4;

const { battletv, loading, hasbeenFetched, hasErrors } =
useAppSelector(battleTvSelector);
const { battletv, loading, hasErrors } = useAppSelector(battleTvSelector);

const loggedInUser = useAppSelector(user);

// initialize the redux hook
const dispatch = useAppDispatch();

if (!hasbeenFetched) {
dispatch(fetchBattleTv());
}
useEffect(() => dispatch(fetchBattleTv()), []);
// if (!hasbeenFetched) {
// dispatch(fetchBattleTv());
// }

useEffect(() => {
const endOffset = itemOffset + itemsPerPage;
Expand Down