You {{ results.result }}!
diff --git a/src/app/pipes/pipes.module.ts b/src/app/pipes/pipes.module.ts
new file mode 100644
index 0000000..13ca4dd
--- /dev/null
+++ b/src/app/pipes/pipes.module.ts
@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+
+import { ReverseArrayPipe } from './reverse-array.pipe';
+
+const exportedPipes = [
+ ReverseArrayPipe
+];
+
+@NgModule({
+ declarations: [
+ ...exportedPipes,
+ ],
+ providers: [
+ ...exportedPipes
+ ],
+ exports: [
+ ...exportedPipes
+ ]
+})
+export class PipesModule { }
\ No newline at end of file
diff --git a/src/app/pipes/reverse-array.pipe.ts b/src/app/pipes/reverse-array.pipe.ts
new file mode 100644
index 0000000..6293fe6
--- /dev/null
+++ b/src/app/pipes/reverse-array.pipe.ts
@@ -0,0 +1,12 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'reverseArray'
+})
+export class ReverseArrayPipe implements PipeTransform {
+
+ transform(input: any[]): any[] {
+ return Array.isArray(input) ? input.slice().reverse() : input
+ }
+
+}
diff --git a/src/app/store/game/game.reducer.ts b/src/app/store/game/game.reducer.ts
index 1a1a8b2..c93a7d5 100644
--- a/src/app/store/game/game.reducer.ts
+++ b/src/app/store/game/game.reducer.ts
@@ -46,7 +46,7 @@ export const reducer = createReducer(
);
export const getHasMatchHistory = (state: State) => state.gameHistory.length > 0;
-export const getMatchHistory = (state: State) => state.gameHistory;
+export const getMatchHistory = (state: State) => state.gameHistory.filter(h => h.result !== 'error');
export const getGameStatus = (state: State) => state.gameStatus;
export const getRecentMatchHistory = (state: State) => state.gameHistory.slice(-1).pop();
export const getPlayerScore = (state: State) => state.gameHistory.reduce((acc, match) => acc += Number(match.result === 'win'), 0);