Compare commits
No commits in common. "468f082b9c557b7cd9732502d5cdf8988b65be65" and "baf4bc279d7fc63193e2071322982649fffdeea7" have entirely different histories.
468f082b9c
...
baf4bc279d
@ -23,7 +23,7 @@ npm i phishies -g
|
||||
## Use in script
|
||||
|
||||
```
|
||||
var phish = require('phishies')
|
||||
var phish = require('phish2')
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "phishies",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.2",
|
||||
"lockfileVersion": 1
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "phishies",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.2",
|
||||
"description": "Node.js aquarium generator module",
|
||||
"main": "phish.js",
|
||||
"repository": {
|
||||
|
11
phish.js
11
phish.js
@ -13,9 +13,7 @@ var fish_types = ["🐟", "🐡", "🐠"]
|
||||
var rare_swimmer_types = ["🐙", "🐬", "🦑", "🦈"]
|
||||
var plant_types = ["🌱", "🌾", "🌿"]
|
||||
var rare_bottom_dwellers = ["🪨", "🐌", "🏰", "🦀", "🐚", "⚓️", "☘️"]
|
||||
var exceedingly_rare_junk = ["🎱", "🎲", "🎮", "🗿", "🎷", "💎", "💰", "🔔", "💀", "💩"]
|
||||
var super_exceedingly_rare_junk = ["🗽", "🔱", "🛳️"]
|
||||
var bubbles = ["°゚", "º", "。"]
|
||||
var exceedingly_rare_junk = ["🎱", "🎲", "🎮", "🗿","🔱", "🎷", "🗽", "💎", "💰", "🔔", "💀", "💩"]
|
||||
|
||||
function aquarium(height, width) {
|
||||
aquariumArray = []
|
||||
@ -27,12 +25,9 @@ function aquarium(height, width) {
|
||||
}
|
||||
for(let i = 0; i < height; i++) {
|
||||
lineArr = []
|
||||
var heightLine = i
|
||||
if (i != height-1) {
|
||||
for(let i = 0; i < width; i++) {
|
||||
if ([0,1].includes(heightLine) && Math.random()*100<7) {
|
||||
lineArr.push(bubbles[Math.floor(Math.random()*bubbles.length)])
|
||||
} else if (Math.random()*100<10) {
|
||||
if (Math.random()*100<10) {
|
||||
lineArr.push(fish_types[Math.floor(Math.random()*fish_types.length)])
|
||||
} else if (Math.random()*100<2) {
|
||||
lineArr.push(rare_swimmer_types[Math.floor(Math.random()*rare_swimmer_types.length)])
|
||||
@ -49,8 +44,6 @@ function aquarium(height, width) {
|
||||
lineArr.push(rare_bottom_dwellers[Math.floor(Math.random()*rare_bottom_dwellers.length)])
|
||||
} else if (Math.random()*100<0.5) {
|
||||
lineArr.push(exceedingly_rare_junk[Math.floor(Math.random()*exceedingly_rare_junk.length)])
|
||||
} else if (Math.random()*100<0.25) {
|
||||
lineArr.push(super_exceedingly_rare_junk[Math.floor(Math.random()*super_exceedingly_rare_junk.length)])
|
||||
} else {
|
||||
lineArr.push(' ')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user