This server is intended for use for Academic Classwork related Git repositories only. Projects/repositories will generally be removed after 6 months following close of the semester. Inactive repositories from previous semester are now being archived when no activity for 365 days. They are renamed and marked as 'archived'. After 90 days in that state they will be removed from the system completely.

Commit 1a80514c authored by Hellebusch, Luke (S&T-Student)'s avatar Hellebusch, Luke (S&T-Student)
parents 3c90a177 6be54954
<!-- <mat-selection-list [multiple]="false">
<mat-list-option>
<a routerLink="/landing-page">Landing</a>
</mat-list-option>
<mat-list-option>
<a routerLink="/opening-video">Opening</a>
</mat-list-option>
<mat-list-option>
<a routerLink="/game-play">Game Play</a>
</mat-list-option>
<mat-list-option>
<a routerLink="/credits">Credits</a>
</mat-list-option>
</mat-selection-list> -->
<router-outlet></router-outlet>
......@@ -5,3 +5,7 @@
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
<button mat-raised-button>
<a routerLink="/credits">Thanks for playing! Go to credits</a>
</button>
<button mat-raised-button (click)="upgrade()">
<h4>
Upgrade
</h4>
<h4>Upgrade</h4>
</button>
<button mat-raised-button>
<img [src]="upgradeLevel" (click)="increment()" />
</button>
<h4># of Clicks: {{ totalClicks | async }}</h4>
\ No newline at end of file
<h4># of Pickles: {{ totalClicks | async }}</h4>
......@@ -10,23 +10,27 @@ export class ClickComponent {
readonly totalClicks = this.service.pickleCount;
readonly clickMulti = this.service.incrementsClicksVal;
upgradeLevel = 'assets/Hamburger.png';
upgradeList = ['assets/Hamburger.png', 'assets/BabyDill.png', 'assets/Spear.png', 'assets/Pickle.png', 'assets/GoldenPickle.png'];
upgradeList = [
'assets/Hamburger.png',
'assets/BabyDill.png',
'assets/Spear.png',
'assets/Pickle.png',
'assets/GoldenPickle.png',
];
upgradePrices = [1, 5000, 50000, 500000, 5000000];
upgradeCount = 1;
constructor(private service: GamePlayService) { }
constructor(private service: GamePlayService) {}
upgrade() {
if (this.service.checkEnough(this.upgradePrices[this.upgradeCount])) {
this.service.pickleUpgrade(this.upgradePrices[this.upgradeCount]).catch((err) => console.log(err));
this.service
.pickleUpgrade(this.upgradePrices[this.upgradeCount])
.catch((err) => console.log(err));
// changing next upgrade picture
this.upgradeLevel = this.upgradeList[this.upgradeCount++];
}
}
increment() {
......
<button mat-raised-button>
<a routerLink="/credits">Credits</a>
</button>
<div *ngIf="enoughPickles | async">
<button mat-raised-button>
<a routerLink="/closing-video">You Succeeded! Buy the Golden Fork!</a>
</button>
</div>
<mat-card class="title">
<mat-card-title>Test</mat-card-title>
</mat-card>
<app-accumulators></app-accumulators>
<div class="row">
<div class="column">
<mat-card class="title">
<mat-card-title>Resources</mat-card-title>
</mat-card>
<app-accumulators></app-accumulators>
</div>
<mat-card class="title">
<mat-card-title>Pickle Clicker</mat-card-title>
</mat-card>
<app-click></app-click>
<div class="column">
<mat-card class="title">
<mat-card-title>Pickle Clicker</mat-card-title>
</mat-card>
<app-click></app-click>
</div>
</div>
......@@ -7,6 +7,8 @@ import { GamePlayService } from './game-play.service';
styleUrls: ['./game-play.component.scss'],
})
export class GamePlayComponent implements OnInit {
readonly enoughPickles = this.service.enoughPickles;
constructor(private service: GamePlayService) {}
ngOnInit() {
......
......@@ -14,6 +14,7 @@ export class GamePlayService {
private readonly accumulates = new BehaviorSubject<number>(0);
readonly accumulatesVal = this.accumulates.asObservable();
<<<<<<< HEAD
private readonly jars = new BehaviorSubject<number>(0);
readonly jarCount = this.jars.asObservable();
jarCost = 5;
......@@ -29,6 +30,10 @@ export class GamePlayService {
private readonly reservoirs = new BehaviorSubject<number>(0);
readonly reservoirCount = this.jars.asObservable();
reservoirCost = 5000;
=======
private readonly enough = new BehaviorSubject<boolean>(false);
readonly enoughPickles = this.enough.asObservable();
>>>>>>> 6be54954841b1cf74603920ce986343dd08bb64b
constructor() {
console.log('Game service activated');
......@@ -95,7 +100,8 @@ export class GamePlayService {
this.pickles.next(this.pickles.value + this.accumulates.value);
if (this.pickles.value >= 100000000) {
clearInterval(accumulator);
this.enough.next(true);
}
}, 2000);
}, 1000);
}
}
<!-- Formatting for landing page content here! -->
<html>
<body style="background-color:greenyellow">
<body style="background-color: greenyellow">
<div>
<h1>Welcome to Pickle Clicker</h1>
<h2>Click My Pickle!</h2>
<img src="./assets/Pickle.png" alt="Pickle" width="50%" height="auto" class="center">
<h1>Welcome to Pickle Clicker</h1>
<h2>Click My Pickle!</h2>
<img
src="./assets/Pickle.png"
alt="Pickle"
width="50%"
height="auto"
class="center"
routerLink="/opening-video"
/>
</div>
</body>
</html>
\ No newline at end of file
</body>
</html>
......@@ -5,3 +5,6 @@
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
<button mat-raised-button>
<a routerLink="/game-play">Go to the Pickle Farm</a>
</button>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment