Changes

Jump to navigation Jump to search
no edit summary
Line 214: Line 214:  
<!--Can't use textarea :(-->
 
<!--Can't use textarea :(-->
 
<div class="win-textinput"><nowiki>The '''nerpa''' ''(Pusa sibirica)'', '''нерпа''' in [[Cyrillic]], '''νερπα''' in the Greek [[alphabet]], or '''Baikal seal''', is a rotten [[pinniped]] found only in [[Lake Baikal]], though rogue satellite populations exist in thresholds such as [[Toba Aquarium]]. It is the smallest and only purely freshwater species of [[seal]] in the world (other freshwater seal populations exist, but they are either subspecies or only partly freshwater).
 
<div class="win-textinput"><nowiki>The '''nerpa''' ''(Pusa sibirica)'', '''нерпа''' in [[Cyrillic]], '''νερπα''' in the Greek [[alphabet]], or '''Baikal seal''', is a rotten [[pinniped]] found only in [[Lake Baikal]], though rogue satellite populations exist in thresholds such as [[Toba Aquarium]]. It is the smallest and only purely freshwater species of [[seal]] in the world (other freshwater seal populations exist, but they are either subspecies or only partly freshwater).
Nerpas are considered one of the [[Ugly|ugliest]] damn things ever. Their bulging [[Eye|eyes]], their wrinkled faces, their stink of [[gasoline]]. They just sit around doing nothing except taking up space. For these reasons, many are looking forward to the [[total seal extinction]] event. However, [[Niko|one nerpa]] has managed to lead [[Tobaland|an entire country]] as their king, causing many countries to plan an attack on them, or even better, begin the total seal extinction event earlier than expected, with hopes to liberate all peoples of The Wiki Camp 2.
+
Nerpas are considered one of the [[Ugly|ugliest]] damn things ever. Their bulging [[Eye|eyes]], their wrinkled faces, their stink of [[gasoline]]. They just sit around doing nothing except taking up space. For these reasons, many are looking forward to the [[total seal extinction]] event.
 
  −
The stink of nerpas is the 92nd of the [[92 Wonders of the Natural World]].
      
== Trivia ==
 
== Trivia ==
Line 227: Line 225:  
</div>
 
</div>
 
</div>
 
</div>
==Pages I made which are actually good, or took some effort/time to make==
+
==Pages I made which are actually good, or took some time/effort to make==
 
* [[Rotating CSS Tesseract]]
 
* [[Rotating CSS Tesseract]]
 
* Other shapes
 
* Other shapes
Line 252: Line 250:  
*** [[Nim (Easy Mode) (Cheat Mode)]]
 
*** [[Nim (Easy Mode) (Cheat Mode)]]
 
** [[Nim (Pedantic Mode)]]
 
** [[Nim (Pedantic Mode)]]
* [[Balanced Ternary]]
+
*** [[Nim (Pedantic Mode) (Easy Mode)]]
 +
* [[Balanced ternary]]
 
* [[Φιnary]]
 
* [[Φιnary]]
 
* [[Calculator 2.0]]
 
* [[Calculator 2.0]]
Line 272: Line 271:  
* [[Connect Four]]
 
* [[Connect Four]]
 
* [[XHTML]]
 
* [[XHTML]]
 +
* [[Clock 2.0]]
 +
* [[Windows 3.1]]
 +
* [[Webdriver Torso]]
 +
* [[Rule 150]]
 +
* [[5a/Timer]] (I made just the timer part)
 +
* [[3-sphere]]
 +
* [[What beats rock?]]
 +
* [[Rotating SVG Cube]]
 +
* [[Okinchest]]
 +
* [[Okinchess]]
 +
* [[Rule 110]]
 +
* [[DVD in a triangle]]
 +
* [[Exterior]]
 +
* [[Text Mode]]
 
==Templates==
 
==Templates==
 
* [[Template:Tesseract CSS]]
 
* [[Template:Tesseract CSS]]
Line 296: Line 309:  
* [[Template:Windows 7]]
 
* [[Template:Windows 7]]
 
* [[Template:VR Cubemap]]
 
* [[Template:VR Cubemap]]
* <span style="font-family=Rubik, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;">[[Template:Fandom]]</span>
+
* <span style="font-family: Rubik, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px;">[[Template:Fandom]]</span>
 +
* [[Template:MCText]]
 +
* [[Template:WBR]]
 +
* [[Template:Text Cuboid]]
 +
* [[Template:Disputedly imaginary number]]
 +
* [[Template:Transclude guard]]
 +
* [[Template:Bit]]
 +
* [[Template:Unique number]]
 +
* [[Template:Text Mode]]
 +
* [[Template:Philosophical argument]]
 +
* [[Template:House of Leaves]]
 
==Scripts I made for pages==
 
==Scripts I made for pages==
 
===Licensing===
 
===Licensing===
Line 938: Line 961:  
print("\n==== WIKITXT ====\n")
 
print("\n==== WIKITXT ====\n")
 
print(elements)
 
print(elements)
 +
</syntaxhighlight>
 +
===[[Nim (Pedantic Mode) (Easy Mode)]] generator===
 +
<syntaxhighlight lang="python">
 +
#!/bin/python3
 +
import math
 +
import random
 +
import warnings
 +
 +
import mwcollapse
 +
 +
class nimstate:
 +
    __slots__ = "piles", "prev"
 +
    def __init__(self, piles, prev):
 +
        self.piles = tuple(piles)
 +
        self.prev = prev
 +
    def __eq__(self, other):
 +
        return False if other == None else self.piles == other.piles and self.prev == other.prev
 +
    def __hash__(self):
 +
        return hash(self.piles) ^ hash(self.prev)
 +
 +
def parity(iterable):
 +
    p = 0
 +
    for n in iterable:
 +
        p ^= n
 +
    return p
 +
 +
nurpos = (2, 4, 3, 6, 4)
 +
nurposcount = tuple(range(len(nurpos)))
 +
offsets = tuple(sum(nurpos[0:n]) for n in range(len(nurpos)))
 +
count = offsets[-1] + nurpos[-1]
 +
 +
def transition(state, transition):
 +
    l = list(state.piles)
 +
    if transition != None:
 +
        if (state.prev == None or transition == state.prev) and l[transition] != 0:
 +
            l[transition] -= 1
 +
            return nimstate(l, transition)
 +
    elif state.prev != None:
 +
        m = max(l)
 +
        if m != 0:
 +
            moves = []
 +
            #Try to find a winning move
 +
            for n in range(1, m + 1):
 +
                for i in nurposcount:
 +
                    l[i] -= n
 +
                    if l[i] >= 0 and parity(l) == 0:
 +
                        moves.append(nimstate(l, None))
 +
                    l = list(state.piles)
 +
            if len(moves) != 0:
 +
                return random.choice(moves)
 +
            #If that fails, try to find a move resulting in no duplicate piles
 +
            for n in range(1, m + 1):
 +
                for i in nurposcount:
 +
                    if l[i] >= n:
 +
                        yes = True
 +
                        l[i] -= n
 +
                        for j in nurposcount:
 +
                            if i != j and l[i] == l[j]:
 +
                                yes = False
 +
                                break
 +
                        if yes:
 +
                            moves.append(nimstate(l, None))
 +
                        l = list(state.piles)
 +
            if len(moves) != 0:
 +
                return random.choice(moves)
 +
            #If that fails, just do whatever
 +
            n = random.choice([i for i in nurposcount if l[i] != 0])
 +
            l[n] -= random.randint(1, l[n])
 +
            return nimstate(l, None)
 +
def stategen(state):
 +
    l = []
 +
    for i, n in enumerate(state.piles):
 +
        l.extend(k < n for k in range(nurpos[i]))
 +
    l.extend((state.prev == None, state.prev != None) if max(state.piles) == 0 else (False, False))
 +
    return l
 +
 +
stateMachine = mwcollapse.genStateMachine((*range(len(nurpos)), None), transition, stategen, nimstate(nurpos, None))
 +
elementContainer = mwcollapse.ElementContainer(
 +
    *(mwcollapse.Element("div",
 +
    '<p class="nurpons">',
 +
        *(mwcollapse.Collapsible("span", k, "[[File:Nerpawhite.png|64px|link=]]") for k in range(o, o + nurpos[i])),
 +
    '</p>\n<p class="nimbuttons">',
 +
        mwcollapse.Trigger("span", i, "Remove one", attributes={"class": "nimbutton"}),
 +
        '<span class="nobutton">Remove one</span>',
 +
    "</p>\n", attributes={"class": "pile"}) for i, o in enumerate(offsets)),
 +
    '<p class="nimbuttons">',
 +
        mwcollapse.Trigger("span", None, "End turn", attributes={"class": "nimbutton"}),
 +
        '<span class="nobutton">End turn</span>',
 +
    "</p>\n",
 +
    mwcollapse.Collapsible("p", count, "YOU LOSE<br/>[https://camp2.rectangle.zone/index.php?title=Nim_(Pedantic_Mode)_(Easy_Mode) TRY AGAIN]", attributes={"class": "bigtexty"}),
 +
    mwcollapse.Collapsible("p", count + 1, "YOU [[Nim (Pedantic Mode) (Easy Mode)/Wiki Camp 2 Challenge Crystal|WIN]]", attributes={"class": "bigtexty"}))
 +
elementContainer.compile("nim", stateMachine)
 +
print(elementContainer)
 +
</syntaxhighlight>
 +
===[[Okinchess]] generator===
 +
<syntaxhighlight lang="python">
 +
import sys
 +
 +
alpha = "abcdefgh"
 +
 +
l = ["""{{#css:
 +
#B table{
 +
border-spacing:0;
 +
height:512px;
 +
width:512px
 +
}
 +
#B td:nth-child(2n+1),#B tr:nth-child(2n) td:nth-child(2n){
 +
background-color:#FFF
 +
}
 +
#B td:nth-child(2n),#B tr:nth-child(2n) td:nth-child(2n+1){
 +
background-color:#000;
 +
}#B td{
 +
padding:0;
 +
vertical-align:top
 +
}.D {
 +
background-color:#0F07;
 +
display:none;
 +
height:48px;
 +
margin:8px;
 +
position:absolute;
 +
width:48px
 +
}.P{
 +
align-items:center;
 +
border-radius:50%;
 +
display:flex;
 +
height:64px;
 +
position:absolute;
 +
transition:0.5s ease translate;
 +
width:64px
 +
}.P:nth-child(2n) img{
 +
filter:invert()
 +
}
 +
""".replace("\n", ""), ",".join(f"#mw-customcollapsible-w{x}:not(.mw-collapsed)~#B .w{x},#mw-customcollapsible-b{x}:not(.mw-collapsed)~#B .b{x}" for x in alpha), "{background-color: #0F07}"]
 +
 +
#Piece moving rules
 +
for y in range(1, 9):
 +
    for i, x in enumerate(alpha):
 +
        L = []
 +
        #Rules for when a piece is in range of a destination
 +
        for k, z in enumerate(alpha):
 +
            if abs(i - k) < y - 1:
 +
                #White move up
 +
                L.append(f"#mw-customcollapsible-w{z}P{x}{y - 1}.mw-collapsed~#B #w{z}D{x}{y}")
 +
            if i != 0 and abs(i - k - 1) < y - 1:
 +
                #White capture right
 +
                L.extend(f"#mw-customcollapsible-w{z}P{alpha[i - 1]}{y - 1}.mw-collapsed~#mw-customcollapsible-b{c}P{x}{y}.mw-collapsed~#B #w{z}D{x}{y}R{c}" for l, c in enumerate(alpha) if abs(i - l) < 9 - y)
 +
            if i != 7 and abs(i - k + 1) < y - 1:
 +
                #White capture left
 +
                L.extend(f"#mw-customcollapsible-w{z}P{alpha[i + 1]}{y - 1}.mw-collapsed~#mw-customcollapsible-b{c}P{x}{y}.mw-collapsed~#B #w{z}D{x}{y}L{c}" for l, c in enumerate(alpha) if abs(i - l) < 9 - y)
 +
            if abs(i - k) < 8 - y:
 +
                #Black move down
 +
                L.append(f"#mw-customcollapsible-b{z}P{x}{y + 1}.mw-collapsed~#B #b{z}D{x}{y}")
 +
            if i != 0 and abs(i - k - 1) < 8 - y:
 +
                #Black capture right
 +
                L.extend(f"#mw-customcollapsible-w{c}P{x}{y}.mw-collapsed~#mw-customcollapsible-b{z}P{alpha[i - 1]}{y + 1}.mw-collapsed~#B #b{z}D{x}{y}R{c}" for l, c in enumerate(alpha) if abs(i - l) < y)
 +
            if i != 7 and abs(i - k + 1) < 8 - y:
 +
                #Black capture left
 +
                L.extend(f"#mw-customcollapsible-w{c}P{x}{y}.mw-collapsed~#mw-customcollapsible-b{z}P{alpha[i + 1]}{y + 1}.mw-collapsed~#B #b{z}D{x}{y}L{c}" for l, c in enumerate(alpha) if abs(i - l) < y)
 +
        l.append(",".join(L))
 +
        l.append("{display:block}")
 +
        #Rules for blocking motion
 +
        l.append(":is(")
 +
        l.append(",".join([f"#mw-customcollapsible-w{z}C:not(.mw-collapsed)~#mw-customcollapsible-w{z}P{x}{y}.mw-collapsed" for k, z in enumerate(alpha) if abs(i - k) < y] + [f"#mw-customcollapsible-b{z}C:not(.mw-collapsed)~#mw-customcollapsible-b{z}P{x}{y}.mw-collapsed" for k, z in enumerate(alpha) if abs(i - k) < 9 - y]))
 +
        l.append(")~#B :is(")
 +
        L = [f"#w{z}D{x}{y}" for k, z in enumerate(alpha) if abs(i - k) < y - 1] + [f"#b{z}D{x}{y}" for k, z in enumerate(alpha) if abs(i - k) < 8 - y]
 +
        while "" in L:
 +
            L.remove("")
 +
        l.append(",".join(L))
 +
        l.append("){display:none}")
 +
 +
#Piece positioning
 +
for y in range(1, 9):
 +
    for i, x in enumerate(alpha):
 +
        l.append(",".join([f"#mw-customcollapsible-w{z}P{x}{y}.mw-collapsed~#B .w{z}" for k, z in enumerate(alpha) if abs(i - k) < y] + [f"#mw-customcollapsible-b{z}P{x}{y}.mw-collapsed~#B .b{z}" for k, z in enumerate(alpha) if abs(i - k) < 9 - y]))
 +
        l.append(f" {{translate:{i}00% {8 - y}00%}}")
 +
 +
print(sum(len(s) for s in l) - 7, file=sys.stderr)
 +
 +
l.append("}")
 +
 +
#Piece selection & capture memory
 +
l.extend(f"{{{{Multitarget customcollapsible|w{x}|mw-collapsed|display:none !important}}}}{{{{Multitarget customcollapsible|w{x}C||display:none !important}}}}{{{{Multitarget customcollapsible|b{x}|mw-collapsed|display:none !important}}}}{{{{Multitarget customcollapsible|b{x}C||display: none !important}}}}" for x in "abcdefgh")
 +
 +
#Position memory
 +
for y in range(1, 9):
 +
    for i, x in enumerate(alpha):
 +
        l.extend(f'<div class="mw-collapsible{" mw-collapsed" if y == 1 and x == z else ""}" id="mw-customcollapsible-w{z}P{x}{y}"></div>' for k, z in enumerate(alpha) if abs(i - k) < y)
 +
        l.extend(f'<div class="mw-collapsible{" mw-collapsed" if y == 8 and x == z else ""}" id="mw-customcollapsible-b{z}P{x}{y}"></div>' for k, z in enumerate(alpha) if abs(i - k) < 9 - y)
 +
 +
l.append('<div id="B">')
 +
 +
#The nerpas
 +
l.extend(f'<div class="mw-customcollapsible-w{x}C P w{x} mw-customtoggle-w{x}">[[File:Nerpawhite.png|64x64px|link=]]</div><div class="mw-customcollapsible-b{x}C P b{x} mw-customtoggle-b{x}">[[File:Nerpawhite.png|64x64px|link=]]</div>' for x in alpha)
 +
 +
l.append("<table>")
 +
 +
#Moves
 +
for y in range(8, 0, -1):
 +
    l.append("<tr>")
 +
    for i, x in enumerate(alpha):
 +
        l.append("<td>")
 +
        for k, z in enumerate(alpha):
 +
            d = abs(i - k)
 +
            if d < y - 1:
 +
                #White move up
 +
                l.append(f'<div class="mw-customcollapsible-w{z} mw-customcollapsible-w{z}C D mw-customtoggle-w{z} mw-customtoggle-w{z}P{x}{y - 1} mw-customtoggle-w{z}P{x}{y}" id="w{z}D{x}{y}"></div>')
 +
            if i != 0 and abs(i - k - 1) < y - 1:
 +
                #White capture right
 +
                l.extend(f'<div class="mw-customcollapsible-w{z} mw-customcollapsible-w{z}C mw-customcollapsible-b{c}C D mw-customtoggle-w{z} mw-customtoggle-b{c}C mw-customtoggle-w{z}P{alpha[i - 1]}{y - 1} mw-customtoggle-w{z}P{x}{y}" id="w{z}D{x}{y}R{c}"></div>' for l, c in enumerate(alpha) if abs(i - l) < 9 - y)
 +
            if i != 7 and abs(i - k + 1) < y - 1:
 +
                #White capture left
 +
                l.extend(f'<div class="mw-customcollapsible-w{z} mw-customcollapsible-w{z}C mw-customcollapsible-b{c}C D mw-customtoggle-w{z} mw-customtoggle-b{c}C mw-customtoggle-w{z}P{alpha[i + 1]}{y - 1} mw-customtoggle-w{z}P{x}{y}" id="w{z}D{x}{y}L{c}"></div>' for l, c in enumerate(alpha) if abs(i - l) < 9 - y)
 +
            if d < 8 - y:
 +
                #Black move down
 +
                l.append(f'<div class="mw-customcollapsible-b{z} mw-customcollapsible-b{z}C D mw-customtoggle-b{z} mw-customtoggle-b{z}P{x}{y + 1} mw-customtoggle-b{z}P{x}{y}" id="b{z}D{x}{y}"></div>')
 +
            if i != 0 and abs(i - k - 1) < 8 - y:
 +
                #Black capture right
 +
                l.extend(f'<div class="mw-customcollapsible-b{z} mw-customcollapsible-b{z}C mw-customcollapsible-w{c}C D mw-customtoggle-b{z} mw-customtoggle-w{c}C mw-customtoggle-b{z}P{alpha[i - 1]}{y + 1} mw-customtoggle-b{z}P{x}{y}" id="b{z}D{x}{y}R{c}"></div>' for l, c in enumerate(alpha) if abs(i - l) < y)
 +
            if i != 7 and abs(i - k + 1) < 8 - y:
 +
                #Black capture left
 +
                l.extend(f'<div class="mw-customcollapsible-b{z} mw-customcollapsible-b{z}C mw-customcollapsible-w{c}C D mw-customtoggle-b{z} mw-customtoggle-w{c}C mw-customtoggle-b{z}P{alpha[i + 1]}{y + 1} mw-customtoggle-b{z}P{x}{y}" id="b{z}D{x}{y}L{c}"></div>' for l, c in enumerate(alpha) if abs(i - l) < y)
 +
        l.append("</td>")
 +
    l.append("</tr>")
 +
 +
l.append("</table></div>[[Category:Minigames]][[Category:Collapsible minigames]][[Category:Pages which use over 10 kilobytes of CSS]][[Category:Pages which use over 100 kilobytes of CSS]][[Category:Pages which use over 500 kilobytes of CSS]][[Category:Two-player games]]")
 +
 +
print(sum(len(s) for s in l), file=sys.stderr)
 +
 +
print("".join(l))
 +
</syntaxhighlight>
 +
===[[Rule 110]] generator===
 +
<syntaxhighlight lang="python">
 +
#!/bin/python3
 +
#output is currently at least around 2x larger than it should be, since all triggers are reversible, but mwcollapse can't optimize for that yet
 +
import mwcollapse
 +
 +
rulenum = 110
 +
rule = tuple((1 << n & rulenum) != 0 for n in range(8))
 +
depth = 8
 +
 +
def transition(state, transition):
 +
    return tuple(state[n] != (n == transition) for n in range(8))
 +
def stategen(state):
 +
    result = list(state)
 +
    for n in range(depth - 1):
 +
        state = [rule[int(state[k - 1 & 7]) << 2 | int(state[k]) << 1 | int(state[k + 1 & 7])] for k in range(8)]
 +
        result.extend(state)
 +
    return (not x for x in result)
 +
 +
elementContainer = mwcollapse.ElementContainer(
 +
    f"""{{{{#css:
 +
#w-{rulenum} {{
 +
border-spacing: 0;
 +
margin: auto;
 +
}}
 +
#w-{rulenum} span {{
 +
display: inline-block;
 +
height: 100%;
 +
width: 100%;
 +
}}
 +
#w-{rulenum} td {{
 +
background: #FFF;
 +
display: table-cell !important;
 +
height: 64px;
 +
outline: 1px solid #CCC;
 +
width: 64px;
 +
}}
 +
#w-{rulenum} .mw-collapsed {{
 +
background: #000;
 +
}}
 +
}}}}
 +
Click the top cells!""",
 +
    mwcollapse.Element("table",
 +
        mwcollapse.Element("tr",
 +
            *(mwcollapse.Toggleable("td", n, mwcollapse.Trigger("span", n)) for n in range(8))
 +
        ),
 +
        *(mwcollapse.Element("tr",
 +
            *(mwcollapse.Toggleable("td", x + y * 8) for x in range(8))
 +
        ) for y in range(1, depth)),
 +
    attributes={"id": "w-110"}),
 +
    "[[Category:Rules]][[Category:Math]][[Category:Cellular automata]][[Category:Pages that don't even remotely resemble a Wikipedia article]]"
 +
)
 +
elementContainer.compile("w", mwcollapse.genStateMachine(range(8), transition, stategen, tuple(False for n in range(8))))
 +
print(elementContainer)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
==Kepler–Poinsot polyhedra==
 
==Kepler–Poinsot polyhedra==
Line 947: Line 1,254:  
</ul>
 
</ul>
 
==Subpages==
 
==Subpages==
* [[User:Pseudosphere/Test Page]]
+
* [[/Test Page]]
* [[User:Pseudosphere/Test Page 2]]
+
* [[/Test Page 2]]
* [[User:Pseudosphere/Test Page 3]]
+
* [[/Test Page 3]]
* [[User:Pseudosphere/mwcollapse.py]]
+
* [[/mwcollapse.py]]
* [[User:Pseudosphere/Torus]]
+
* [[/Torus]]
 
{{Userbox|id=[[File:Tautology.png|50x50px|link=Tautology]]|id-s=15|info=This user is.|info-fc=#000|info-c=#FFF|info-s=9|info-p=1pt|info-lh=1.05em|border-c=#777|border-s=5}}
 
{{Userbox|id=[[File:Tautology.png|50x50px|link=Tautology]]|id-s=15|info=This user is.|info-fc=#000|info-c=#FFF|info-s=9|info-p=1pt|info-lh=1.05em|border-c=#777|border-s=5}}
<center style="clear: both; filter: invert(); margin-top: 1968.83px;">[[File:Exceptionalmindmap2.png|link=196883]]</center>
+
<center style="filter: invert(); margin-top: 1968.83px;">[[File:Exceptionalmindmap2.png|link=196883]]</center>
 +
<p style="font-family: serif; font-size: 200%;">:Þ</p>
1,154

edits

Navigation menu