Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
AnswerRe: Pointers in struct to itself Pin
mav.northwind2-Oct-05 23:27
mav.northwind2-Oct-05 23:27 
QuestionTransparent Windows Forms Pin
Gihansam2-Oct-05 20:42
Gihansam2-Oct-05 20:42 
AnswerRe: Transparent Windows Forms Pin
g00fyman3-Oct-05 4:03
g00fyman3-Oct-05 4:03 
QuestionPls help in email grouping..... Pin
2-Oct-05 19:16
suss2-Oct-05 19:16 
QuestionSQL Server does not exist Pin
Anonymous2-Oct-05 18:57
Anonymous2-Oct-05 18:57 
AnswerRe: SQL Server does not exist Pin
Luis Alonso Ramos2-Oct-05 19:07
Luis Alonso Ramos2-Oct-05 19:07 
GeneralRe: SQL Server does not exist Pin
Mahesh Kumar V K2-Oct-05 19:45
Mahesh Kumar V K2-Oct-05 19:45 
QuestionSoccer Game Pin
nume2-Oct-05 18:11
nume2-Oct-05 18:11 
Guys,

I need help, this program using windows application
1. I don't know how to add multiple difficulty levels to the soccer game..
2. how the user choose a difficulty
with this question do i just add buttons so the user can choose?? or else??
3.adjust the opponen'ts likelihood of scoring based on the difficulty factor..

However, i paste my code for likelihood..

//primary game variables
private int playerScore = 0;
private int oppScore = 0;
private int timeLeft = 600;
private int currentPlayer = 1;
private int nextPlayer = 2;

//data structure for likelihood of shot
private double[,] shotChance =
{{-1, .8, .6, .4, .1, .01},
{.8, -1, .8, .6, .4, .02},
{.8, .8, -1, .8, .6, .03},
{.8, .8, .8, -1, .8, .04},
{.8, .8, .8, .8, -1, .2},
{.8, .8, .8, .8, .8, -1}};

or i just set up the opponent likelihood from belows code?

private void setupOpp(){
//set up opponents
int x;
int y;

for (int i= 1; i < 5; i++){
picOpp[i] = new PictureBox();
picOpp[i].Size = new Size(25,25);
x = (int)((this.Width - picOpp[i].Width)/2);
y = (int)(pnlField.Height/i - 30);
picOpp[i].Location = new Point(x, y);
picOpp[i].Image = myPics.Images[0];
picOpp[i].SizeMode = PictureBoxSizeMode.StretchImage;
picOpp[i].Tag = i.ToString();
pnlField.Controls.Add(picOpp[i]);
} // end for loop
} // end setupOpp

or by set up from the badshot?so the opponent team have better when the rate is higher??
public void badShot(){
Random roller = new Random();
double toSucceed;
int playerNumber;

lblAnnounce.Text = "Opponent gets ball...";
//check for opponent goal
toSucceed = roller.NextDouble();
//change the following value to alter game difficulty
if (toSucceed < .05){
oppScore++;
updateScore();
MessageBox.Show("Opponent Scores!!");
setPlayer(HALFBACK);
} else {
playerNumber = roller.Next(5);
lblAnnounce.Text += "recovered by " + playerName[playerNumber];
setPlayer(playerNumber);
} // end opponent scores if

any idea??please help me...thanks

-- modified at 0:16 Monday 3rd October, 2005
QuestionSending WinForm to printer Pin
MeterMan2-Oct-05 16:49
MeterMan2-Oct-05 16:49 
AnswerRe: Sending WinForm to printer Pin
Robert Rohde2-Oct-05 19:15
Robert Rohde2-Oct-05 19:15 
Questionsome questions... Pin
Sasuko2-Oct-05 12:59
Sasuko2-Oct-05 12:59 
AnswerRe: some questions... Pin
Robert Rohde2-Oct-05 19:19
Robert Rohde2-Oct-05 19:19 
QuestionMicrosoft Money in C# Pin
jgallen232-Oct-05 12:27
jgallen232-Oct-05 12:27 
AnswerRe: Microsoft Money in C# Pin
Vasudevan Deepak Kumar2-Oct-05 23:25
Vasudevan Deepak Kumar2-Oct-05 23:25 
GeneralRe: Microsoft Money in C# Pin
jgallen233-Oct-05 5:23
jgallen233-Oct-05 5:23 
QuestionHow do I create a new folder programmatically? Pin
tom_dx2-Oct-05 11:54
tom_dx2-Oct-05 11:54 
AnswerRe: How do I create a new folder programmatically? Pin
mav.northwind2-Oct-05 12:24
mav.northwind2-Oct-05 12:24 
GeneralRe: How do I create a new folder programmatically? Pin
tom_dx3-Oct-05 11:56
tom_dx3-Oct-05 11:56 
AnswerRe: How do I create a new folder programmatically? Pin
Mahesh Kumar V K2-Oct-05 19:53
Mahesh Kumar V K2-Oct-05 19:53 
QuestionSave a text file as ANSI instead of UTF-8? Pin
mcyrrer2-Oct-05 10:37
mcyrrer2-Oct-05 10:37 
AnswerRe: Save a text file as ANSI instead of UTF-8? Pin
mav.northwind2-Oct-05 12:26
mav.northwind2-Oct-05 12:26 
GeneralRe: Save a text file as ANSI instead of UTF-8? Pin
mcyrrer2-Oct-05 20:14
mcyrrer2-Oct-05 20:14 
AnswerRe: Save a text file as ANSI instead of UTF-8? Pin
pipiscrew3-Jul-12 10:14
pipiscrew3-Jul-12 10:14 
QuestionWhy is my .mdb connection not working? Pin
Anonymous2-Oct-05 9:38
Anonymous2-Oct-05 9:38 
AnswerRe: Why is my .mdb connection not working? Pin
Mahesh Kumar V K2-Oct-05 21:39
Mahesh Kumar V K2-Oct-05 21:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.