Skip to content

Commit 1aa6f5f

Browse files
authored
Merge pull request #109 from AlgorithmicGames/Redir
Replaced `AI-Tournaments` with `Algorithmic Games`.
2 parents f04647a + c91042a commit 1aa6f5f

10 files changed

Lines changed: 33 additions & 37 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "Arena"]
22
path = Arena
3-
url = https://github.com/AI-Tournaments/Arena-Manager.git
3+
url = https://github.com/AlgorithmicGames/Arena-Manager.git

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ai-tournaments.io
1+
algorithmic.games

GitHubApi.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class GitHubApi{
7474
if(this.isLoggedIn()){
7575
localStorage.setItem('PopupMessage-'+this.#STARTED+timestamp, 'GitHub API rate limit reached\n424px\nWait until the <a href="https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit" target="_blank">API rate limit</a> timer resets: <time class="countdown" datetime="'+new Date(timestamp)+'"></time>');
7676
}else{
77-
localStorage.setItem('PopupMessage-'+this.#STARTED+timestamp, 'GitHub API rate limit reached\n371px\nGitHub has a lower <a href="https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit" target="_blank">API rate limit</a> for unsigned requests. <a href="https://ai-tournaments.io/login">Login</a> to be able to continue to create matches or wait until the timer resets: <time class="countdown" datetime="'+new Date(timestamp)+'"></time>');
77+
localStorage.setItem('PopupMessage-'+this.#STARTED+timestamp, 'GitHub API rate limit reached\n371px\nGitHub has a lower <a href="https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit" target="_blank">API rate limit</a> for unsigned requests. <a href="https://algorithmic.games/login">Login</a> to be able to continue to create matches or wait until the timer resets: <time class="countdown" datetime="'+new Date(timestamp)+'"></time>');
7878
}
7979
return this.#waitUntil(timestamp).then(()=>GitHubApi.fetch(path, init));
8080
}
@@ -118,7 +118,7 @@ class GitHubApi{
118118
`<!DOCTYPE html>
119119
<html>
120120
<head>
121-
<link rel="stylesheet" href="https://ai-tournaments.io/defaults.css">
121+
<link rel="stylesheet" href="https://algorithmic.games/defaults.css">
122122
<style>
123123
${options.removeBodyMargin?`html, body {
124124
margin: 0;
@@ -150,12 +150,12 @@ class GitHubApi{
150150
return options.async ? promise : iframe;
151151
}
152152
static fetchArenas(){
153-
return GitHubApi.fetch('search/repositories?q=topic:AI-Tournaments+topic:AI-Tournaments-Arena-v'+GitHubApi.#ARENA_VERSION).then(response => response.json()).then(json => {
153+
return GitHubApi.fetch('search/repositories?q=topic:Algorithmic-Games+topic:Algorithmic-Games-Arena-v'+GitHubApi.#ARENA_VERSION).then(response => response.json()).then(json => {
154154
let arenas = [];
155155
let promises = [];
156156
json.items.forEach(repo => {
157157
let data = {
158-
official: repo.owner.login === 'AI-Tournaments',
158+
official: repo.owner.login === 'AlgorithmicGames',
159159
name: repo.full_name.replace(/.*\/|-Arena/g, ''),
160160
raw_url: null,
161161
default: 'https://raw.githubusercontent.com/'+repo.full_name+'/'+repo.default_branch+'/',

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# AI-Tournaments
2-
Please read [here](https://github.com/AI-Tournaments).
1+
# Algorithmic Games
2+
Please read [here](https://github.com/AlgorithmicGames).

Replay/ReplayExportTemplate.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="UTF-8">
5-
<title>AI-Tournaments Replay Export</title>
5+
<title>Algorithmic Games Replay Export</title>
66
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TJFMG29186"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-TJFMG29186');</script>
77
<meta content="width=device-width, initial-scale=1.0" name="viewport">
88
<meta content="yes" name="mobile-web-app-capable">
@@ -20,14 +20,14 @@
2020
function a(){
2121
if(Object.keys(DATA).length){
2222
let iframe = document.getElementById('iframe');
23-
iframe.src = 'https://ai-tournaments.io/Replay/';
23+
iframe.src = 'https://algorithmic.games/Replay/';
2424
window.onmessage = messageEvent => {
2525
switch(messageEvent.data.type){
2626
case 'Replay-Initiated':
2727
iframe.contentWindow.postMessage({type: 'Add-External-Replay-Data', name: DATA.name, value: DATA.value}, '*');
2828
break;
2929
case 'Replay-Store-ID':
30-
location.href = 'https://ai-tournaments.io/#Replay/#'+messageEvent.data.value;
30+
location.href = 'https://algorithmic.games/#Replay/#'+messageEvent.data.value;
3131
break;
3232
}
3333
};

Replay/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<input type="button" id="open-replay-in-new-tab" value="🡽" class="sticky"/>
5959
</div>
6060
<div id="replay-container-failToLoad" class="hidden error">
61-
Replay failed to load <a href="https://ai-tournaments.io/ReplayHelper.js">ReplayHelper.js</a>.
61+
Replay failed to load <a href="https://algorithmic.games/ReplayHelper.js">ReplayHelper.js</a>.
6262
</div>
6363
<div id="previous-replay-container" class="hidden">
6464
<label>Previous replay:</label>

Replay/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function a(){
271271
html = html.replace(/\/\*DATA\/\*\/.*\/\*\/DATA\*\//, JSON.stringify({name: option.dataset.name, value: replayData}));
272272
let element = document.createElement('a');
273273
element.setAttribute('href', 'data:text/plain;charset=utf-8,'+encodeURIComponent(html));
274-
element.setAttribute('download', option.dataset.name+'.AI-Tournaments-Replay.html');
274+
element.setAttribute('download', option.dataset.name+'.AlgorithmicGames-Replay.html');
275275
element.style.display = 'none';
276276
document.body.appendChild(element);
277277
element.click();
@@ -398,7 +398,7 @@ function a(){
398398
_element_btnLock.disabled = true;
399399
_editor.setMode('view');
400400
IndexedDBOperation.do({operation: 'addReplayToStorage', data: _editor.getText()});
401-
GitHubApi.fetch('search/repositories?q=topic:AI-Tournaments+topic:AI-Tournaments-Replay+topic:'+_replayData.body.arena.full_name.replace('/','--')).then(response => response.json()).then(response => {
401+
GitHubApi.fetch('search/repositories?q=topic:Algorithmic-Games+topic:Algorithmic-Games-Replay+topic:'+_replayData.body.arena.full_name.replace('/','--')).then(response => response.json()).then(response => {
402402
document.getElementById('default-option').value = _replayData.header.defaultReplay;
403403
response.items.forEach(repo => {
404404
if(repo.has_pages){
@@ -415,7 +415,7 @@ function a(){
415415
});
416416

417417
let options = [..._element_viewOptions.options];
418-
const officialUrl = 'https://ai-tournaments.github.io/';
418+
const officialUrl = 'https://AlgorithmicGames.github.io/';
419419
options.sort(function(a, b){
420420
if(b.id === 'default-option'){return 1;}
421421

@@ -445,7 +445,7 @@ function a(){
445445
let secureUrl = isURLSecure(url);
446446
if(!secureUrl && !session?.externalReplaysAccepted){
447447
const passphrase = 'I accept external replay viewers';
448-
session.externalReplaysAccepted = (prompt('External replays are by default blocked for security reasons, since they are outside of AI-Tournaments control. So use them at your own risk. Only do this to URLs for code that you trust.\n\nWrite "'+passphrase+'" to allow external replay viewers.')??'').toLowerCase() === passphrase.toLowerCase();
448+
session.externalReplaysAccepted = (prompt('External replays are by default blocked for security reasons, since they are outside of Algorithmic Games\' control. So use them at your own risk. Only do this to URLs for code that you trust.\n\nWrite "'+passphrase+'" to allow external replay viewers.')??'').toLowerCase() === passphrase.toLowerCase();
449449
GitHubApi.setSessionStorage(session);
450450
}
451451
if(secureUrl || session.externalReplaysAccepted){

Tournament/Clientside/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,18 @@ function a(){
147147
}
148148
function getParticipants(arenaFullName=''){
149149
let arena = arenaFullName.replace('/','--');
150-
let arenaReplace = 'AI-Tournaments-Participant-'+arena.replace(/AI-Tournaments--|-Arena/g, '')+'-';
150+
let arenaReplace = 'Algorithmic-Games-Participant-'+arena.replace(/Algorithmic-Games--|-Arena/g, '')+'-';
151151
Array.from(document.getElementsByClassName('participants')).forEach(selectElement =>{
152152
while(0 < selectElement.length){
153153
selectElement.remove(0);
154154
}
155155
});
156156
let promises = [];
157-
GitHubApi.fetch('search/repositories?q=topic:AI-Tournaments+topic:AI-Tournaments-Participant+topic:'+arena,{
157+
GitHubApi.fetch('search/repositories?q=topic:Algorithmic-Games+topic:Algorithmic-Games-Participant+topic:'+arena,{
158158
headers: {Accept: 'application/vnd.github.mercy-preview+json'} // TEMP: Remove when out of preview. https://docs.github.com/en/rest/reference/search#search-topics-preview-notices
159159
}).then(response => response.json()).then(response => {
160160
response.items.forEach(repo => {
161-
if(!repo.topics.includes('ai-tournaments-retired')){
161+
if(!repo.topics.includes('Algorithmic-Games-Retired')){
162162
promises.push(GitHubApi.fetch('repos/' + repo.full_name + '/git/trees/' + repo.default_branch)
163163
.then(response => response.json())
164164
.then(data => {

index.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="UTF-8">
5-
<title>AI-Tournaments</title>
5+
<title>Algorithmic Games</title>
66
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TJFMG29186"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-TJFMG29186');</script>
77
<meta content="width=device-width, initial-scale=1.0" name="viewport">
88
<meta content="yes" name="mobile-web-app-capable">
@@ -260,10 +260,6 @@
260260
}
261261
</style>
262262
<script>
263-
if(location.href.endsWith('?soon=aitournaments.io') || location.href.endsWith('?soon=ai-tournaments.io')){
264-
//window.location.replace('https://ai-tournaments.io'); Pending...
265-
window.location.replace('/');
266-
}
267263
sessionStorage.setItem('PageLoaded', Date.now());
268264
</script>
269265
<script src="index.js"></script>
@@ -280,7 +276,7 @@
280276
<div id="header-title-fake">GitHub.com</div>
281277
</div>
282278
<div class="dropdown">
283-
<a href="https://github.com/orgs/AI-Tournaments/discussions/categories/1-announcements" target="_blank">Announcements</a>
279+
<a href="https://github.com/orgs/AlgorithmicGames/discussions/categories/1-announcements" target="_blank">Announcements</a>
284280
<div class="dropdown-content" id="announcements-dropdown"></div>
285281
</div>
286282
<div class="dropdown">
@@ -303,9 +299,9 @@
303299
</div>
304300
<div id="header-right">
305301
<div class="dropdown">
306-
<label>Community</label>
302+
<a href="https://algorithmic.games/Community/" target="_blank">Community</a>
307303
<div class="dropdown-content">
308-
<a class="github-logo" href="https://github.com/orgs/AI-Tournaments/discussions">
304+
<a class="github-logo" href="https://github.com/orgs/AlgorithmicGames/discussions">
309305
<svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 496 496"><path d="M165.9 389.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2 .6-2-1.3-4.3-4.3-5.2-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 0C106.1 0 0 105.3 0 244c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5 21.3 0 42.8 2.9 62.8 8.5 0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 449.8 496 354.9 496 244 496 105.3 383.5 0 244.8 0zM97.2 344.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
310306
GitHub
311307
</a>
@@ -323,7 +319,7 @@
323319
</div>
324320
</div>
325321
<div id="login-button-wrapper">
326-
<a id="login-button" href="https://ai-tournaments.io/login">Login</a>
322+
<a id="login-button" href="https://algorithmic.games/login">Login</a>
327323
</div>
328324
</div>
329325
</div>

index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function a(){
1212
let fakeHeader = document.getElementById('header-title-fake');
1313
fakeHeader.classList.add('clickable');
1414
fakeHeader.addEventListener('click', ()=>{
15-
window.open('https://github.com/AI-Tournaments', '_blank').focus();
15+
window.open('https://github.com/AlgorithmicGames', '_blank').focus();
1616
});
1717
Array.from(document.getElementsByClassName('open-screen')).forEach(element => {
1818
element.addEventListener('click', ()=>{openScreen(element.dataset.url)});
@@ -56,9 +56,9 @@ function a(){
5656
document.getElementById('login-button').href += '?origin='+encodeURI(location.protocol+'//'+location.host+location.pathname);
5757
document.getElementById('logout-button').addEventListener('click', GitHubApi.logout);
5858
openWindow(
59-
'Welcome to the tournament!','Here you can participate in different games (known as Arenas) for a fun challenge to stay atop of the leaderboards. Read the <a href="https://github.com/AI-Tournaments#participate" target="_blank">Participate</a> section in the README to get started.\n'+
60-
'If you want to you can join the community discussions over at the <a href="https://discord.gg/jhUJNsN" target="_blank">Discord server</a>.\n'+
61-
'<span style="color:var(--secondary-background-color)">- Tournament servant</span>',
59+
'Welcome to Algorithmic Games!','Here you can participate in different games (known as Arenas) for a fun challenge and try to stay atop on the leader boards. Read the <a href="https://github.com/AlgorithmicGames#participate" target="_blank">Participate</a> section in the README to get started.\n'+
60+
'If you want to you join the discussions, head on over to the <a href="https://algorithmic.games/Community/Official/" target="_blank">Community handbook</a> and read where we are.\n'+
61+
'<span style="color:var(--secondary-background-color)">- Algorithmic Games</span>',
6262
true, '582px', true);
6363
try{
6464
if(JSON.parse(localStorage.getItem('LocalDevelopment.Setups')).find(setup => setup.active)){
@@ -81,7 +81,7 @@ function a(){
8181
let sourceAvailable = document.getElementById('source-available');
8282
sourceAvailable.classList.add('clickable');
8383
sourceAvailable.addEventListener('click', ()=>{
84-
fetch('https://raw.githubusercontent.com/AI-Tournaments/.github/main/profile/README.md').then(response => response.text()).then(readme => {
84+
fetch('https://raw.githubusercontent.com/AlgorithmicGames/.github/main/profile/README.md').then(response => response.text()).then(readme => {
8585
let why = readme.replace(/.+?(?=## Why Source Available?)/s, '').replace(/.*\n/,'');
8686
GitHubApi.formatMarkdown(why, {
8787
async: true,
@@ -180,7 +180,7 @@ function a(){
180180
function loadAnnouncements(amount=5){
181181
let announcementsContainer = document.getElementById('announcements-dropdown');
182182
GitHubApi.fetch('graphql', {method: 'POST', body: {query: `{
183-
repository(name: "Community", owner: "AI-Tournaments") {
183+
repository(name: "Community", owner: "AlgorithmicGames") {
184184
discussions(
185185
categoryId: "DIC_kwDOKCNqZ84CYRsS"
186186
orderBy: {field: CREATED_AT, direction: DESC}
@@ -208,7 +208,7 @@ function a(){
208208
announcementsContainer.appendChild(item);
209209
});
210210
let item = document.createElement('a');
211-
item.href = 'https://github.com/orgs/AI-Tournaments/discussions/categories/1-announcements';
211+
item.href = 'https://github.com/orgs/AlgorithmicGames/discussions/categories/1-announcements';
212212
item.target = '_blank';
213213
item.innerHTML = '. . .';
214214
announcementsContainer.appendChild(item);
@@ -424,10 +424,10 @@ function a(){
424424
return chars;
425425
}
426426
function checkGitHubStatus(){
427-
fetch('https://ai-tournaments.io/').then(r=>r.text()).then().catch(error => {
427+
fetch('https://algorithmic.games/').then(r=>r.text()).then().catch(error => {
428428
postGitHubProblem('GitHub Pages');
429429
});
430-
fetch('https://raw.githubusercontent.com/AI-Tournaments/AI-Tournaments.io/main/index.html').then(r=>r.text()).then().catch(error => {
430+
fetch('https://raw.githubusercontent.com/AlgorithmicGames/algorithmic.games/main/index.html').then(r=>r.text()).then().catch(error => {
431431
postGitHubProblem('raw.githubusercontent.com');
432432
});
433433
}

0 commit comments

Comments
 (0)