Skip to content

Commit

Permalink
feat() update rules
Browse files Browse the repository at this point in the history
  • Loading branch information
immortal-tofu committed Dec 5, 2023
1 parent 5bd6383 commit 99a51c1
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/abi/cipherbomb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/modules/common-ui/components/Connect/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const Connect: React.FC<{

const refreshNetwork = useCallback(async () => {
if (await hasValidNetwork()) {
await createFhevmInstance(account);
setValidNetwork(true);
await createFhevmInstance(account);
} else {
setValidNetwork(false);
}
Expand Down
8 changes: 8 additions & 0 deletions src/modules/home/components/Home/Home.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.Home {
background: url('./assets/home.png') no-repeat;
background-size: contain;
background-position: center right;
max-width: 80vw;
min-height: 80vh;
}

.Home__account {
text-overflow: ellipsis;
max-width: 80vw;
Expand Down
Binary file added src/modules/home/components/Home/assets/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/modules/home/components/Rules/Rules.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,17 @@
margin-left: 0;
margin-bottom: 15px;
}

.Rules__item {
display: flex;
align-items: center;
}

.Rules__item h3 {
margin: 0;
}

.Rules__card {
margin-right: 30px;
margin-bottom: 15px;
}
44 changes: 36 additions & 8 deletions src/modules/home/components/Rules/Rules.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Back, Subtitle, Title } from '../../../common-ui';
import bomb from '../../../game/assets/bomb.jpg';
import neutral from '../../../game/assets/neutral.jpg';
import wire from '../../../game/assets/wire.jpg';

import './Rules.css';

Expand Down Expand Up @@ -41,14 +44,39 @@ export const Rules = () => {
<dd>2 members of the Red Cipher</dd>
</dl>
<Subtitle>Cards</Subtitle>
<dl className="Rules__list">
<dt>Safe code</dt>
<dd>Nothing happens.</dd>
<dt>Vulnerability</dt>
<dd>Founding a vulnerability brings you close to victory if you are part of the Decryptors.</dd>
<dt>Bomb</dt>
<dd>Triggering the bomb encrypts the digital world and hands victory to the Red Cipher.</dd>
</dl>
<div className="Rules__list">
<div className="Rules__item">
<div className="Rules__card">
<img src={neutral} width="80" alt="Safe Code" />
</div>
<div>
<h3>Safe code</h3>
<div className="Rules__cardText">Nothing happens.</div>
</div>
</div>
<div className="Rules__item">
<div className="Rules__card">
<img src={wire} alt="Wire" width="80" />
</div>
<div>
<h3>Vulnerability</h3>
<div className="Rules__cardText">
Founding a vulnerability brings you close to victory if you are part of the Decryptors.
</div>
</div>
</div>
<div className="Rules__item">
<div className="Rules__card">
<img src={bomb} alt="Bomb" width="80" />
</div>
<div>
<h3>Bomb</h3>
<div className="Rules__cardText">
Triggering the bomb encrypts the digital world and hands victory to the Red Cipher.
</div>
</div>
</div>
</div>
<Subtitle>How to play</Subtitle>
<p>
The game is played over a maximum of <strong>4 rounds</strong> during which you attempt to identify
Expand Down

0 comments on commit 99a51c1

Please sign in to comment.