Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d1e8e7f

Browse files
committed
Clear display logs on Self, AI and Manual match initiation
- Update Leaderboard styles
1 parent d1a35be commit d1e8e7f

File tree

3 files changed

+153
-3
lines changed

3 files changed

+153
-3
lines changed

src/app/components/SocketHandler.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ export class SocketHandler extends React.Component<SocketHandlerInterfaces.Props
9191
mapId: number,
9292
commitHash: string,
9393
): void {
94-
// tslint:disable-next-line: no-console
95-
console.log(`MAP ID:${mapId}, MATCH_MODE:${matchMode}`);
94+
this.props.clearAllLogs();
95+
this.props.clearDisplayDebugLog();
96+
this.props.updateDisplayDebugLog('');
97+
this.props.updateGameLog('', '', '');
9698
// @ts-ignore
9799
this.stompClient.send(
98100
'/socket/request/match',

src/app/components/SubmitBar/RunOptions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class RunOptions extends React.Component<
4949

5050
const maps = this.props.maps || hardCodedMap;
5151

52-
const hardCodedAiIds: number[] = [1, 2];
52+
const hardCodedAiIds: number[] = [1];
5353

5454
const aiIds = hardCodedAiIds;
5555

+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
import { FaqElement } from 'app/components/home/FaqElement';
2+
import { Footer } from 'app/components/home/Footer';
3+
import * as styles from 'app/styles/LandingPage.module.css';
4+
import * as LandingPageInterfaces from 'app/types/LandingPage';
5+
import classnames from 'classnames';
6+
import * as React from 'react';
7+
import { NavBar, NavPage } from './Navbar';
8+
9+
export class LandingPage extends React.Component<LandingPageInterfaces.Props, {}> {
10+
private faq = [
11+
{
12+
answer:
13+
'Codecharacter is a great place to delve into the world of programming! The fun and competitive community couped with the instructive docs is a great starting place for someone learning to code .',
14+
question: 'Do I have to know programming to play CodeCharacter?',
15+
},
16+
{
17+
answer: "Simply follow the signup link and you'll be on your way!",
18+
question: 'How do I participate?',
19+
},
20+
{
21+
answer:
22+
'Yes! Code Character is played completely on the web. However, we provide functionality for you to write code offline on your own text editor and compile the code. For more details, check out the player docs <a href="https://code.pragyan.org/docs">code.pragyan.org/docs</a>',
23+
question: 'Is the event completely online?',
24+
},
25+
{
26+
answer:
27+
'All players can match up against other players of their choice and the match results cause corresponding rating changes. The top 20 players are considered to be in Div 1. For these players, every 6 hours, matches are simulated between all Div 1 players to normalize the leaderboard. ',
28+
question: 'What is the tournament format?',
29+
},
30+
{
31+
answer: `
32+
The Latest versions of Chrome and Firefox can be used play CodeCharacter!`,
33+
question: 'What are the supported browsers?',
34+
},
35+
];
36+
37+
public constructor(props: LandingPageInterfaces.Props) {
38+
super(props);
39+
}
40+
41+
public render() {
42+
return (
43+
<div className={classnames(styles.root)}>
44+
<NavBar isLoggedIn={this.props.isLoggedIn} page={NavPage.HOME} />
45+
<div className={classnames(styles.head, 'container-fluid')}>
46+
<div className={classnames('col-lg-6', styles.head_img)}>
47+
<img src="assets/img/bot_dashboard.png" className={styles.img_big} />
48+
<img src="assets/img/bot_dashboard_mob.png" className={styles.img_mob} />
49+
</div>
50+
<div className={classnames(styles['landing-heading'], 'col-lg-6')}>
51+
<h1 className="row">Code Character</h1>
52+
<p>AI programming challenge</p>
53+
</div>
54+
</div>
55+
<div className={classnames('container-fluid', styles['first-cont'])}>
56+
<div className={classnames('row', styles['about-container'])} id={'about'}>
57+
<div className={classnames('col-md', styles['about-codechar'])}>
58+
<h1>About</h1>
59+
<p>
60+
{' '}
61+
Code Character is an online AI programming competition, where you write C++ code for
62+
a real time strategy game. Test your code against yourself, against the computer,
63+
against your previous versions and then against everyone else on multiple maps!{' '}
64+
</p>
65+
<p> Challenge others to improve your rating as you climb up the leaderboard!</p>
66+
<ul>
67+
<li>Integrated code editor and development environment</li>
68+
<li>
69+
View your AI play with different versions of itself and with existing AI Bots
70+
</li>
71+
<li>Live leaderboard, challenge anyone.</li>
72+
<li>Active discussion forum for any game related questions</li>
73+
<li>Extensive tutorials and documentation</li>
74+
</ul>
75+
<p>
76+
Go through the{' '}
77+
<a href="https://code.pragyan.org/docs" target="_blank">
78+
docs
79+
</a>{' '}
80+
and start playing!
81+
</p>
82+
<p>
83+
In case of any queries, discuss at the{' '}
84+
<a
85+
href="https://forum.pragyan.org/t/code-character-frequently-asked-questions/20"
86+
target="_blank"
87+
>
88+
CodeCharacter Forum
89+
</a>{' '}
90+
.
91+
</p>
92+
<h1>Prizes</h1>
93+
<p>A total of 50K INR up for grabs for acing the leaderboard.</p>
94+
<h6>College Students</h6>
95+
<ul>
96+
<li>First Place - 10K INR</li>
97+
<li>Second Place - 6K INR</li>
98+
<li>Third Place - 4K INR</li>
99+
</ul>
100+
<h6>Professionals</h6>
101+
<ul>
102+
<li>First Place - 15K INR</li>
103+
<li>Second Place - 10K INR</li>
104+
<li>Third Place - 5K INR</li>
105+
</ul>
106+
<p>
107+
Note: College Student Winners will be requested to provide valid college proof to
108+
collect prizes.
109+
</p>
110+
</div>
111+
<div className={classnames(styles['codechar-video'], 'col-lg-5')}>
112+
<img width="auto" height="auto" src="assets/img/bot_hi.png" />
113+
</div>
114+
</div>
115+
116+
<div className="row justify-content-center" id={'faq'}>
117+
<img src="assets/img/faq.jpg" height={200} />
118+
</div>
119+
<div className={classnames('row', styles.faq_section)}>
120+
<div className="col-lg-6 col-sm-12">
121+
{this.faq.map((element, index) => {
122+
if (index % 2 === 0) {
123+
return (
124+
<FaqElement key={index} question={element.question} answer={element.answer} />
125+
);
126+
}
127+
return null;
128+
})}
129+
</div>
130+
<div className="col-lg-6 col-sm-12">
131+
{this.faq.map((element, index) => {
132+
if (index % 2 === 1) {
133+
return (
134+
<FaqElement key={index} question={element.question} answer={element.answer} />
135+
);
136+
}
137+
return null;
138+
})}
139+
</div>
140+
</div>
141+
</div>
142+
<div className="position-sticky align-bottom" id={'contact'}>
143+
<Footer />
144+
</div>
145+
</div>
146+
);
147+
}
148+
}

0 commit comments

Comments
 (0)