Skip to content

Commit

Permalink
dope wars
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed May 29, 2024
1 parent e835d61 commit 7631bf8
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 30 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
![Roll Your Own Banner](.github/banner-wide.png)
![Dope Wars Banner](.github/banner-wide.png)

# Roll Your Own
# Dope Wars

![Github Actions][gha-badge]

[gha-badge]: https://img.shields.io/github/actions/workflow/status/cartridge-gg/rollyourown/test.yml?branch=main

Roll Your Own is an onchain adaptation of the original Drug Wars game, built on Starknet using the [Dojo Engine](https://github.com/dojoengine/dojo).
Dope Wars is an onchain adaptation of the original Drug Wars game, built on Starknet using the [Dojo Engine](https://github.com/dojoengine/dojo).

## Development

Expand Down
2 changes: 1 addition & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ keystore_path = "/Users/boo/sozo_acc"
# private_key = "0x2e8ac99614186737cefc47effe03134f5a19c6dc2443c16510d3384769f9c78"

[tool.dojo.world]
name = "Roll Your Own"
name = "Dope Wars"
description = "Onchain adaptation of the classic Drug Wars game. An immersive recreation of the 1999 TI-83 classic where street smarts reign supreme and every choice matters in the end."
website = "https://rollyourown.preview.cartridge.gg/"
icon_uri = "file://assets/icon.png"
Expand Down
Binary file added web/public/images/play-dope-wars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed web/public/images/play-ryo.png
Binary file not shown.
41 changes: 26 additions & 15 deletions web/src/components/layout/DrawerMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
import { useConfigStore, useDojoContext, useGameStore, useRouterContext } from "@/dojo/hooks";
import { IsMobile } from "@/utils/ui";

import {
Button,
Card,
Divider,
Drawer,
DrawerBody,
DrawerCloseButton,
DrawerContent,
DrawerFooter,
DrawerHeader,
DrawerOverlay,
HStack,
Heading,
ListIcon,
ListItem,
ListItemProps,
StyleProps,
Text,
UnorderedList,
VStack,
keyframes,
useDisclosure,
} from "@chakra-ui/react";
import { ReactNode, useRef } from "react";
import { Cigarette, Clock, Close, Dots, Home, PaperIcon, Refresh } from "../icons";
import { Calendar } from "../icons/archive";
import { HeaderButton, MediaPlayer } from ".";
import { ChainSelector, ConnectButton, TokenBalance } from "../wallet";
import { Burners } from "../wallet/Burners";
import { Predeployed } from "../wallet/Predeployed";
import { OnGoingGames } from "../pages/home/OnGoingGames";
import { ProfileLink, ProfileLinkDrawer } from "../pages/profile/Profile";

import { ProfileLinkDrawer } from "../pages/profile/Profile";
import { useAccount } from "@starknet-react/core";
import { HustlerStats } from "../pages/profile/HustlerStats";
import { BuiltBy } from "../pages/home";
import { HustlerIcon, Hustlers } from "../hustlers";
import { shortString } from "starknet";
import { Calendar } from "../icons/archive";

import colors from "@/theme/colors";

const slideAnim = keyframes`
0% {transform: translateX(0); color: ${colors.neon["500"]};}
70% {transform: translateX(-90%); color: ${colors.neon["500"]};}
85% {transform: translateX(-72%); color: ${colors.yellow["500"]};}
86% {transform: translateX(-72%); color: ${colors.neon["500"]};}
95% {transform: translateX(-80%); color: ${colors.neon["500"]};}
100% {transform: translateX(-75%); ; color: ${colors.neon["400"]};}
`;

const DrawerMenu = () => {
const { router, gameId, isAdmin } = useRouterContext();
Expand All @@ -55,8 +58,16 @@ const DrawerMenu = () => {
<DrawerOverlay onClick={onClose} />
<DrawerContent minW="340px">
<DrawerHeader borderBottom="solid 2px" borderColor="neon.900" pb={2}>
<Heading color="neon.500" fontWeight="normal">
<PaperIcon width="28px" height="28px" />
<Heading
color="neon.500"
fontWeight="normal"
// textAlign="center"
position="relative"
left="120%"
animation={`${slideAnim} .8s ease-out 0.3s 1 normal forwards`}
willChange="transform"
>
<PaperIcon width="28px" height="28px" />
</Heading>
</DrawerHeader>
<Close position="absolute" right="16px" top="16px" cursor="pointer" onClick={onClose} />
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/pages/home/HomeLeftPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ export const HomeLeftPanel = () => {
}}
>
<VStack zIndex="2">
<Text textStyle="subheading" fontSize="11px">
{/* <Text textStyle="subheading" fontSize="11px">
DOPE WARS
</Text>
</Text> */}
<Heading fontSize={["30px", "48px"]} fontWeight="normal">
Roll your Own
Dope Wars
</Heading>
</VStack>

Expand Down
4 changes: 2 additions & 2 deletions web/src/components/pages/profile/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ const getShareText = (game: GameClass, gameInfos: Game): string => {
return encodeURIComponent(
`${playerName} has reached Day ${game.player.turn} with ${formatCash(
game.player.cash,
)} $paper. Think you can out hustle them? #rollyourown.\n\n${window.location.origin}`,
)} $paper. Think you can out hustle them? #dopewars.\n\n${window.location.origin}`,
);
} else {
return encodeURIComponent(
`${playerName} got dropped on Day ${game.player.turn} but pocketed ${formatCash(
game.player.cash,
)} $paper before checking out. Think you can out hustle them? #rollyourown.\n\n${window.location.origin}`,
)} $paper before checking out. Think you can out hustle them? #dopewars.\n\n${window.location.origin}`,
);
}
};
Expand Down
4 changes: 2 additions & 2 deletions web/src/hooks/media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ const updateMetadata = () => {

if ("mediaSession" in navigator && currentMedia) {
navigator.mediaSession.metadata = new MediaMetadata({
title: currentMedia.name || "Roll your own",
artist: "Roll your own",
title: currentMedia.name || "Dope Wars",
artist: "Dope Wars",
artwork: [
{ src: "/favicon-32x32.png", sizes: "32x32", type: "image/png" },
{ src: "/favicon-16x16.png", sizes: "16x16", type: "image/png" },
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function App({ Component, pageProps }: AppProps) {
<Fonts />
<GlobalStyles />
<NextHead>
<title>Roll your Own</title>
<title>Dope Wars</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
Expand Down
6 changes: 3 additions & 3 deletions web/src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Head, Html, Main, NextScript } from "next/document";

const metas = {
title: "RollYourOwn",
title: "Dope Wars",
descritpion:
"Onchain adaptation of the classic Drug Wars game. An immersive recreation of the 1999 TI-83 classic where street smarts reign supreme and every choice matters in the end.",
image: {
url: "/images/play-ryo.png",
url: "/images/play-dope-wars.png",
width: "1200",
height: "638",
height: "648",
},
};

Expand Down

0 comments on commit 7631bf8

Please sign in to comment.