1
0
mirror of https://github.com/mizanxali/uno-online synced 2025-12-06 10:13:27 +00:00

Changed folder structure

This commit is contained in:
Mizanali Panjwani
2021-02-22 05:02:50 +05:30
parent 6d4f183acc
commit fd86244bef
17 changed files with 1 additions and 20 deletions

10
client/src/App.css Normal file
View File

@@ -0,0 +1,10 @@
.App {
text-align: center;
}
.card {
border: 1px solid black;
padding: 20px;
margin: 20px;
display: inline-block;
}

15
client/src/App.js Normal file
View File

@@ -0,0 +1,15 @@
import './App.css'
import { Route } from 'react-router-dom'
import Homepage from './components/Homepage'
import Game from './components/Game'
const App = () => {
return (
<div className="App">
<Route path='/' exact component={Homepage} />
<Route path='/play' exact component={Game} />
</div>
)
}
export default App

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
import React from 'react'
import { Link } from 'react-router-dom'
const Homepage = () => {
return (
<div className='Homepage'>
<h1>UNO</h1>
<Link to='/play'><button>START GAME</button></Link>
</div>
)
}
export default Homepage

13
client/src/index.css Normal file
View File

@@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

14
client/src/index.js Normal file
View File

@@ -0,0 +1,14 @@
import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'
import { BrowserRouter } from 'react-router-dom'
ReactDOM.render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>,
document.getElementById('root')
)

View File

@@ -0,0 +1,8 @@
//pack of 108 cards (# = reverse)
export default [
'0R', '1R', '1R', '2R', '2R', '3R', '3R', '4R', '4R', '5R', '5R', '6R', '6R', '7R', '7R', '8R', '8R', '9R', '9R', 'skipR', 'skipR', '#R', '#R', 'D2R', 'D2R',
'0G', '1G', '1G', '2G', '2G', '3G', '3G', '4G', '4G', '5G', '5G', '6G', '6G', '7G', '7G', '8G', '8G', '9G', '9G', 'skipG', 'skipG', '#G', '#G', 'D2G', 'D2G',
'0B', '1B', '1B', '2B', '2B', '3B', '3B', '4B', '4B', '5B', '5B', '6B', '6B', '7B', '7B', '8B', '8B', '9B', '9B', 'skipB', 'skipB', '#B', '#B', 'D2B', 'D2B',
'0Y', '1Y', '1Y', '2Y', '2Y', '3Y', '3Y', '4Y', '4Y', '5Y', '5Y', '6Y', '6Y', '7Y', '7Y', '8Y', '8Y', '9Y', '9Y', 'skipY', 'skipY', '#Y', '#Y', 'D2Y', 'D2Y',
'W', 'W', 'W', 'W', 'D4W', 'D4W', 'D4W', 'D4W'
]

View File

@@ -0,0 +1,9 @@
export default function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1))
var temp = array[i]
array[i] = array[j]
array[j] = temp;
}
return array
}